in reply to meaning for the code
What it does and what it's suppose to do are two separate things.
/(?:(\d*)\.?(\d+))|(?:(\d+)\.?(\d*))/
is equivalent to
/(?:(\d*)\.?(\d+))/
except the former returns 4 values instead of 2 in list context (the last two being undef).
Try matching against "123." to illustrate the bug.
|
|---|