* Thus wrote Anthony Ritter ([EMAIL PROTECTED]):
> Curt Zirzow wrote in message:
> 
> > This exact thing was talked about earlier today, with the subject
> > 'Using eregi_replace()'.
> ........................
> 
> Right.
> 
> However, I've tried using the following code in which the text from the URL
> is printed out completely and then I change the variable from $contents to
> $text and using the line with preg_replace(), it still outputs the complete
> text without the pattern match.
 
hm.. I sort of misunderstood, preg_replace isn't what you need. use
preg_match instead.

I did some testing you can see the code and results here:
http://zirzow.dyndns.org/html/php/tests/preg/parse_doc.php

> $newtext= preg_replace("!.*?(REGIONAL.*YORK).*!","$1",$text);
btw, there these should be single quotes ~~~~~~~~~~^  ^

or "\$1" so php doesn't expand the variable (even though its an
illagal php var name.)


HTH,

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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

Reply via email to