Re: reg exp matching/replacing
| From: | Jason D | Date: | Thu, 03 Oct 2002 14:24:52 +0000 |
| Subject: | Re: reg exp matching/replacing | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-118750@lists.php.net to get a copy of this message | ||
Jen,
Don't use eregi_replace when str_replace will do.
$contents = str_replace($matches[0][$i], $blah, $contents);
Also the dots should be escaped or gif and jpg without
dots before them will be matched.
preg_match_all('{\/*[A-z0-9_/-]+(\.gif|\.jpg)}', $contents, $matches);
____________________________________________________________
Tired of all the SPAM in your inbox? Switch to LYCOS MAIL PLUS
http://www.mail.lycos.com/brandPage.shtml?pageId=plus