Re: regular expressions help please
| From: | John Fishworld | Date: | Tue, 30 Apr 2002 22:35:08 +0000 |
| Subject: | Re: regular expressions help please | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-95445@lists.php.net to get a copy of this message | ||
Thanks after playing about with that I've got the following which does seem
to work !
$imode_code[$i] = eregi_replace("(src=)(\")([a-z0-9_\/-]+\.gif)(\")",
"\\1\\2$path/\\3\\2", $imode_code[$i]);
Very very very slowly getting the hang of regexs !
What does your /i do at the end ???
Thanks
> Try this:
>
> preg_match_all("/src=(\'[a-z0-9_\/-]+\.gif\')/i", $input, $MATCH);
> print_r($MATCH);
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> Money is its own reward.
> */
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>