Re: regular expressions gods!
| From: | jeremy brand | Date: | Wed, 23 Aug 2000 04:08:38 +0000 |
| Subject: | Re: regular expressions gods! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-13074@lists.php.net to get a copy of this message | ||
for ($i=0; $i< $(your number of tags-1); $i++)
eregi_replace('href="', 'href="text_', $tags[$i]);
Maybe this will help, but I'm not exactly sure what you are asking.
-jeremy brand
_______________________________________________________________________
GnuPG Fingerprint: 9F5E 95E0 1CC2 E054 84EA 6099 8ACD 9DBA D2C0 5EA9
_ http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html
for more __
On Wed, 23 Aug 2000, Justin French wrote:
> Date: Wed, 23 Aug 2000 12:54:06 +1000
> From: Justin French <justin@indent.com.au>
> To: php-general@lists.php.net
> Subject: [PHP] regular expressions gods!
>
> Okay,
>
> I have a series of strings, $TAGS[1], $TAGS[2]
> thru to TAGS[????].
>
> I want to search these strings for any link to a
> .php3 file within the current directory, with any
> query string (or none). So it might be page.php3,
> or page.php3?id=stuff, or whatever.
>
> in DOS syntax, <A HREF="*.php3*"
>
>
> I then want to preceed the file name (eg page.php3)
> with a $prefix string. In otherwords, if the prefix
> is "text_", <A HREF="page.php3" will get turned into
> <A HREF="text_page.php3"... if there is a query string,
> or any other stuff in the <A> tag (like a TARGET=) it
> should all stay intact.
>
>
> Thanks heaps for any help / solutions posted :)
>
>
> Justin French
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>