in reply to Re: pattern matching
in thread pattern matching
Although I don't disagree with the overall thrust of your argument, there is a tiny mistake.
However.. if your text chunk is:$text='ADABCDE6789023424'; $text=~/([A-Z]{2,5}\d{5})/ or die; print $1; # will print 'DE67890'
It actually would print ABCDE67890. Remember the {2,5} matches the longest string it can, unless you make it non-greedy.
|
|---|