Because you're binding to the end-of-string and \r is matching as a whitespace character after the version number (and is in the value returned to $version)
Why are you binding to the end at all?
/^Version:\s*(\d+)/ seems adequate to me.
-Greg
In reply to Re: Can't match my regex
by Anonymous Monk
in thread Can't match my regex
by Saladino
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |