in reply to Re: meaning for the code
in thread meaning for the code
No way!
The variable $whole is assigned the contents of the first set of capturing parentheses (the first (\d*)).
The variable $deci is assigned the contents of the second set of capturing parentheses (the first (\d+)).
/(?:(\d*)\.?(\d+))|(?:(\d+)\.?(\d*))/ ^^^^^ ^^^^^ Always Always $whole $deci
Should the second alternation match — it never will — then $whole and $deci will be undef.
|
|---|