I want to negate the string
*.INFO
How can I do this?
I have tried
^(?!.*\*\.INFO).*$
but it is not working.
I want to negate the string
*.INFO
How can I do this?
I have tried
^(?!.*\*\.INFO).*$
but it is not working.
Based on your recent comment, this matches anything starting with *.
except *.INFO
:
\*\.(?!INFO\b)\S+
Note that by adding the \b
to INFO
this will match strings that start with*.INFO
but are followed by other characters, eg *.INFOXYZ