Closed lupine closed 1 year ago
Hi @lupine,
I’d be happy to review a PR for that but we’d need to introduce a new API for it to avoid breaking compatibility. Perhaps another method on Scanner or a separate class altogether?
As there's been no activity on this issue for over a year, I'll close it in a week unless there's an update.
Hi,
Today I had occasion to try to replace a usage of the Ruby
Regexp
class like:with an RE2 regular expression.
I quickly ran up against the fact that
RE2::Scanner#scan
returnsArray<String>
rather thanArray<RE2::MatchData>
.In my case, I want access to the
begin
andend
metadata that theRE2::MatchData
would carry.Is this something you'd accept a PR for?
It's possible I'll be able to use
ReplaceAll
instead, in this particular case, or work around it another way, so I can't guarantee I'll put one together, but I wanted to assess the likelihood of it being accepted early :)