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.
In reply to Re^2: pattern matching
by gwadej
in thread pattern matching
by Spooky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |