jxia has asked for the wisdom of the Perl Monks concerning the following question:
Following is my code:
$_ = 'A /gif/cart.gif is a /gif/cart.gif'; s#/(gif/.*\.gif)#$1#g; # Only replaced first one print "NEW1: $_\n"; $_ = 'A /gif/cart.gif is a /gif/cart.gif'; s#/(gif/\w*\.gif)#$1#g; # This one works print "NEW2: $_\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: pattern matching question
by hardburn (Abbot) on Jun 20, 2003 at 15:48 UTC | |
Re: pattern matching question
by KPeter0314 (Deacon) on Jun 20, 2003 at 16:02 UTC | |
Re: pattern matching question
by DigitalKitty (Parson) on Jun 20, 2003 at 17:19 UTC | |
Re: pattern matching question
by monsieur_champs (Curate) on Jun 20, 2003 at 18:38 UTC |