3

I was hoping to figure out how make re2 syntax work with a regular expression like the following:

(?!(support|help|admin|contact))@example\.com

Where you do not match on exactly those terms above.

For example, it should match:

[email protected]
[email protected]

but not match:

[email protected]
[email protected]

i I cannot figure out a way for exactly those terms. I have seen a lot of work arounds where it requires you to test if it does match in golang/the re2 processer, and then return false. However this is not possible, because a service requires the regex, and I cannot ask it to alternate the match value.

Any ideas?

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
John Zrobin
  • 45
  • 2
  • 7

0 Answers0