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.
In reply to Re: meaning for the code
by ikegami
in thread meaning for the code
by sanku
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |