To capture the first element, try $_ =~ m/^([01])[01]*$/ and print "$_:'$1'\n" for qw[ 0 1 00 11 10 01 012];
-Mark
In reply to Re: Regex failure interpretation
by kvale
in thread Regex failure interpretation
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |