Regex matching line not containing the string

I'd like to select a lines with does not contain a word SCREEN. I tried the following regex (?<!SCREEN).+ but it seems not to work - selects all the lines. Why doesn't it work?

1

2 Answers

The short answer: ^((?!SCREEN).)*$

This is inspired by which contains a full explanation

1

Another try for this case: (SCREEN){0}.*$

Hope that can help.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like