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";
In reply to pattern matching question by jxia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |