0
str_1='0+$+1(0(01)*00)*11+(0+$+1(0(01)*00)*11)(0+1(0(01)*00)*11)*(0+$+1(0(01)*00)*11)'

As you can see above, I'm trying to match all binary numbers between 0 and 100(both included) divisible by 7. I have used the above regex, whilst checking it on regex101, it gives the error: '+ The preceding token is not quantifiable'.Is there something that I'm doing wrong?

AcK
  • 2,063
  • 2
  • 20
  • 27
le_gheeya
  • 1
  • 2
  • 1
    You cannot quantify the end of string, `$`. – Wiktor Stribiżew Oct 19 '21 at 08:33
  • 1
    What does “I'm trying to match all binary numbers between 0 and 100(both included) by 7” mean? Matching all binary numbers between 0 and 100 is as simple as `^[01]{1,3}$`. What does “by 7” mean? *Divisible by 7?* – Konrad Rudolph Oct 19 '21 at 08:34

0 Answers0