Re:Text Showdown: Gap Buffers vs. Ropes
by burntsushi on Wednesday October 11, 2023 @06:04PM
(#37850881)
Despite having studied Go's regex engine in depth, I have somehow missed those methods. To the point that when you responded, I assumed they were added recently. I checked to be sure, and indeed not. They've been there since Go 1.0.
Thanks for the correction!
The regexp.Regexp.FindReaderIndex and .FindReaderSubmatchIndex methods tell you the position of the match.