$contents = preg_replace( "|<item>.*?$file.*?</item>|si", "", $contents );
it's being run on an XML file, where each entry is <item>......</item> with a $file pointer in there. it works okay, except for the fact that it deletes that record, and every record before it. i can't figure out why it's being greedy? i know i gotta be missing something real simple... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php