Mr. Shawn H. Corey wrote: > On Mon, 2008-08-11 at 14:02 -0700, Saya wrote: >> >> I have the following issue: >> >> my $s = "/metadata-files/test-desc.txt,/metadata-files/birthday.txt,/ >> web-media/images/bday-after-help.jpg,javascript:popUp('/pop-ups/ >> birthday/main.html','bday-pics',785,460);" >> >> Now I want $s to be like: "/metadata-files/test-desc.txt,/metadata- >> files/birthday.txt,/web-media/images/bday-after-help.jpg,/pop-ups/ >> birthday/main.html" >> >> I have been working with: >> >> $s =~ s/javascript:popup\('(.*)',(.*)/$1/gi; > > $s =~ s/javascript:popup\('([^']*)',(.*)/$1/gi;
There's no reason to capture $2 and not use it. The global substitution is also unlikely to be correct. Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/