I have a pcre regex string and I am trying to convert to re2. Here is the pcre and an the string to match on.
\%(?!$|\W)
It matches only on the % and in case there is ! or non-word char doesn't
%252525253E%252553Csvg%25252525252525252Fonload%252525252525252525252525252525252525252525252525252525253Dalert(document.domain)%252525252
Result: % % % %
My best conversion is this:
\%[^!$|\W]
Result: %2 %3 %3 %2 %3 %3
This however matches on the first digit and I do not want that, I'd like it to behave exactly as the pcre version. This is where I test:
regex-golang DOT appspot DOT com/assets/html/index.html
regex101 DOT com
Any help will be appreciated.