Home > other >  How to write a regex expression to match strings which is concat by "00" and "11"
How to write a regex expression to match strings which is concat by "00" and "11"

Time:07-01

that is to say, the string is combined with pair "00" and "11"s.

Example: match: "0000" "0011" "111111" "110011" not match: "000" "0100" "00111" "120011" "1000"

CodePudding user response:

Please see solution below:

https://regex101.com/r/59Q9yC/1

^(00|11) $
  • Related