I want to write a regex which matches following scenarios,
10
1100
111000
11110000
// etc. consecutive 1 count should equal consecutive 0 count.
Is it possible to write a regex for this?
I suppose I could write, 1{n}0{n}
, but it didn't work here: https://regex101.com/
May be this is not doable with regex?
I can of course do this with a loop. But I want to know if this is possible using regex.
Thank you!!!!