in reply to Number of bits, length of RegExp
^0*(?:10*10*)*$ ^0*(?:10*10*)*10*$ [download]
Hopefully this is an idle curiosity question. Regexes are not the best way to do this at all.