This question already has an answer here:
I am having a hard time with Go's regex. It seems it's different than other language, can someone help me on this.
Obj. I want MustCompile to find all repeated characters in the string. APPLE (where P's repeating)
re := regexp.MustCompile("(\\w)\\${1}\\+")
Above is what I have tried but didn't work at all. Basically I wanted to do:
([A-Za-z])\1+
Can someone tell me what I am doing wrong?
Example below:
https://play.golang.org/p/DeuaIva968
</div>
Apparently Golang doesn't supposed back referencing due to efficiency. :( Thank you everyone for your help.