Code Comments
Programming Forum and web based access to our favorite programming groups.Can anyone explain the following behaviour?
When I run the script below the results of bracket matches are different:
"1 2" and "12"
------------------------
$_ = '123';
if(/(1|12)(2?)/)
{
print "$1 $2\n";
}
if(/(12|1)(2?)/)
{
print "$1 $2\n";
}
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.