all: replace regexp with grafana/regexp
Created by: keegancsmith
grafana/regexp's speedup branch contains the stdlib regexp with multiple patches applied to speed up regexp. The benchmark improvements are quite impressive across the board. The series of patches are being considered for inclusion in golang. I took a look over them, and they look legit enough for us to start using it.
This commit replaces all uses of regexp with grafana/regexp. This replacement was done via a simple string replace on
^\s*"regexp"
Followed by goimports -w across the repository. I then manually inspected each result to ensure it was on an import.
I considered adding a depguard rule. However, it would then also include regexp/syntax and would be a pain to use since we interact with dependencies using it. Additionally I couldn't get the lint exclusion rules working in the few places we require the stdlib regexp package.
Here is an example PR to prometheus which does the same thing. In that case the benefit was for making regex matching rules in the PromQL faster. https://github.com/prometheus/prometheus/pull/10251
Test Plan: backend integration tests