Hacker News new | ask | show | jobs
by ok_dad 31 days ago
Go stdlib regexp package does not support back references, as it uses the RE2 engine. You can use them in replace but not matching.
1 comments

Regexp does not use re2, it is a separate implementation of the same concepts.
Yes my bad, I meant it implements that algorithm, but that’s not quite right either, it’s like RE2 but slightly different, with the same results. I read the code to see what was actually under the hood and it’s pretty cool.