Saturday, April 10, 2004, 2:02:04 AM, you wrote: > 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? <snipped> without further ado: $str = <your stuff here>; $what = array("/\r\nupdate or remove/", "/\r\nDid you go.*\?\r\n/i"); $with = array('', ''); echo preg_replace($what, $with, $str); hth Richard -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php