in reply to Re: (2) Extract last two digits from numbers
in thread Extract last two digits from numbers

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:

Replies are listed 'Best First'.
Re: (4) Extract last two digits from numbers
by Limbic~Region (Chancellor) on Jan 06, 2004 at 16:10 UTC
    duff,
    That's what I get for trying to type what my brain is thinking after spending nearly 36 hours traveling half way around the world with only a few hours sleep. You are most correct. I was thinking about modifying my ^ and $ anchors to \b and somehow saw them in tachyon's code. They are obviously not there and I obviously need more sleep.

    Salamat po (courteous form of thank you in Tagalog)

    L~R