Home : General : Perl Programming :

General: Perl Programming: Re: [Andy] Regex driving me *MAD*: Edit Log

Here is the list of edits for this post
Re: [Andy] Regex driving me *MAD*
Your regex is wrong:

$string =~ s|\Qsrc="\E(.*?)/(.*?)\.gif\"\>|src="/$2.gif">|sig;

Notice the last closing >. In your string, your first img tag doesn't have a closing > right after the src, so your match is going all the way to the second one.

Cheers,

Alex
--
Gossamer Threads Inc.

Last edited by:

Alex: Mar 27, 2006, 9:53 AM

Edit Log: