in reply to A (non) reg-ex question
my @foo = split /01/"00001111"; $foo[0]=~s/0/1/; if ($foo[0] eq $foo[1]) {print "String is OK\n";} [download]
"00001111"=~/^[0]+[1]+$/; [download]