I think you are getting messed up because $( gets replaced with $REAL_GROUP_ID (ie $( ...)use strict; my $string = 'Price: $21343.355344'; my $searchString = qr|^Price: \$([0-9]+\.[0-9]+)|; if($string =~ /$searchString/) { print "Matches: $1\n"; } else { print "No Match: $`\n"; }
In reply to Re: Perl & Regex
by osunderdog
in thread Perl & Regex
by Kzin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |