Negate match in RE2 syntax?
How can I write a regex in RE2 for “match strings not starting with 4 or 5”?
In PCRE I’d use ^(?!4) but RE2 doesn’t support that syntax.
You can use this regex:
^ matches start and
[^45] matches anything but
5 at start.
- Database Administration Tutorials
- Programming Tutorials & IT News
- Linux & DevOps World
- Ebook Reviews
- PES Matches, Skills & News