4

I want to match some repeated number like 1111, but '\1' is invalid escape sequence in golang. How to do that?

reg := regexp.MustCompile(`(\d)\1{3}`)
030
  • 10,842
  • 12
  • 78
  • 123
yutian
  • 51
  • 3

1 Answers1

0

golang's RE2 engine does not support backreferences.

chaos
  • 122,029
  • 33
  • 303
  • 309