I am trying to figure out a RegExp to match the following strings…
- MyClassSetupEngine
- MyClassExecuteEngine
- MyClassDatalog
but not the specific string
- MyClassSetup
Notice the string #1 includes the string #4 but #1 should be found by the RegExp while #4 should not.
I tried the following (with no success so far):
MyClass(^(Setup).+)
MyClass(?!(Setup).+)
EDIT I’m using C++ with boost regexp 1.35.0
Try:
The dollar sign signifies the end of the string.
[Note, this works for Javascript – what language are you using?]