Select a line not containing “2D” string would look something like that:

^((?!2D).)*$

If you would like to select a lice which contains a phase or patern you would use the fallowing expresion:

.*(2D).*

In the first example, we use negative look ahead expression wrapped in extra round brackets/parentheses.

Look behind:

(?<=Keyword).*

Look ahead:

.*(?=Keyword)

You can also negate this expression by replacing = with !

Read also:

https://www.regular-expressions.info/lookaround.html

0
Would love your thoughts, please comment.x
()
x