XP is just a number | |
PerlMonks |
Re^3: a regular expression questionby roboticus (Chancellor) |
on Dec 18, 2012 at 15:41 UTC ( [id://1009408]=note: print w/replies, xml ) | Need Help?? |
As toolic mentioned, the .* construct is greedy and tries to get the longest match. If you turn it into .*?, it then looks for the shortest match. If you read the link he provided, you could verify that yourself. ...roboticus When your only tool is a hammer, all problems look like your thumb.
In Section
Seekers of Perl Wisdom
|
|