regexp: support case-insensitive prefix strings #48955
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Performance
Milestone
For a pattern like
foo.*bar
, the regexp compiler will extract the string"foo"
and search for it usingstrings.Index
before trying anything else.I propose that this be extended to the case-insensitive version
(?i)foo.*bar
.I did a trial implementation just calling
strings.EqualFold
repeatedly, and it is much faster:The text was updated successfully, but these errors were encountered: