Just to be clear, tachyon's regex will match the last two digits of the first set of digits in a string that are at least 4 digits long
That's not clear at all because that's not what his regular expression does. What it does is match the second pair of the first sequence of 4 digits within a string. Here's tachyon's code again: my ($digits)= $str =~ m/\d\d(\d\d)/; and here is what your examples should have looked like:
In reply to Re: (3) Extract last two digits from numbers
by duff
in thread Extract last two digits from numbers
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |