regexp: document that FindReaderIndex reads past the match in some cases #21883
Labels
Documentation
Issues describing a change to documentation.
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What did you do?
https://play.golang.org/p/aKIosxo6aP
What did you expect to see?
What did you see instead?
I remember reading somewhere in the godoc that the readers can eat the underlying runes to an arbitrarily degree, but it's not clear from the documentation for FindReaderIndex that this is possible.
Workaround
I had to manually rewind the reader. This solution was not obvious at first, maybe a short addendum to the package function will clarify that it the function may skip matches.
https://play.golang.org/p/J9ubm_43wW
The text was updated successfully, but these errors were encountered: