I want to catch all binary gaps in bin number with regex. For example if I have 1010010001 I want to get array of these 3 strings: "0", "00", "000" but my regex doesn't use 3-rd "1" for both "101" and "1001" combinations. Here is my regex:
/1(0+)1/g
How I should modify my regex to get desired result ?