Oha$_ = "00111"; do { print "$_\n"; } while ( s/(1*?)(0*?)01/$2${1}10/ ); 00111 01011 10011 01101 10101 11001 01110 10110 11010 11100
edit: feel free to change $2${1}10 with $2$1\Q10 :-)
In reply to having fun with RE - was: Re: One Zero variants_without_repetition
by oha
in thread One Zero variants_without_repetition
by thenetfreaker
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |