I'm trying to 'clean up' some text that is extracted from a web directory, and I need to use (I think) preg_replace or ereg_replace, etc. I've read a bunch of tutorials, but none of them seem to cover the particular thing I want to do. Here's an example of text I need to process:

---------

J.  Smith   ( More Info )
map
driving directions
add to My Directory
update or remove

Did you go to High School with J.  Smith?
 
B. Dixon   ( More Info )
map
driving directions
add to My Directory
update or remove

Did you go to High School with B. Dixon?

M.  Jones   ( More Info )
map
driving directions
add to My Directory
update or remove

Did you go to High School with M. Jones?

---------

The above is a string. I want to eliminate, for example, all the lines that say "Did you... ?", but I don't know how to refer to them because they are each a little different (because of the name). I know regular expressions can do this, but I can't seem to wrap my mind around the necessary arguments... This being my first foray into regex. I've written feeble stuff like:

$result = ereg_replace("Did you go\[a-zA-Z]\?","",$result);

But of course it doesn't work. Any ideas? Thanks.

...Rene
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to