4

Let's say that I have following strings:

  • mail to
  • tel:+358123456
  • http://www.google.fi
  • mailto:foo@bar.fi
  • hello world
  • telephone
  • elephant
  • penny
  • link
  • owl

How can I find only strings that do not start with 'tel:', 'http://' and 'mailto:' in RE2 syntax?

I've tried following with following syntax, but it filters out all of them:

[^(https?://|tel:|mailto:)]

edit: RE2 syntax does not support negative lookbehind/lookahead.

4

1 に答える 1