- or download this
qr/ (?(DEFINE)
( 00 (?1) | 11 (?2) | ) # group 1: carry = 0
...
)
\A(?1)\Z /x;
- or download this
qr/ (?(DEFINE)
( 00 (?1) | 11 01 (?1) | 11 10 (?3) | )
...
)
\A(?1)\Z /x;
- or download this
my $Regex_Pattern =
qr/ \A ( 00 | 11 01 | 11 10 ( 00 10 | 11 )* 00 01 )* \Z /x;