^(0*10*1)*0*$ or ^(?:0*10*1)*0*$ if your groups without capture are supported by your regular expression engine.
It can also be "simplified" to ^((0*1){2})*0*$ , whatever you find more readable.
This corresponds to 1 pair and gaskets with any number of zeros if necessary. It does not match if the number 1 odd. It matches an empty string.
It does not use anything interesting, so it should work in most programming languages.
See in action regex101 .
Vache source share