I would like to write a regex that can match binary string where consecutive 1s must have odd length.
Examples: 1001110111 is accepted, and 10110111 is not accepted.
(1(11)*|0*)*
The best I came up with is the one above, which is not correct. This regex will match consecutive even 1s too. Any other ideas?
TIA