O
Orson
Sorry, this is probably silly question, but I cannot find right
answer.
I am trying to use grep -P (for perl regular expressions). I want to
match lines that do not contain the chars "sync".
I thought I could do:
grep -P "[^(sync)]" mytextfile
I understand [] matches any char in the brackets and (sync) groups
those chars together, so I would negate to mean should not match those
chars.
This is return all lines in the file. I am doing something wrong, just
do not know what. Can someone explain, please?
answer.
I am trying to use grep -P (for perl regular expressions). I want to
match lines that do not contain the chars "sync".
I thought I could do:
grep -P "[^(sync)]" mytextfile
I understand [] matches any char in the brackets and (sync) groups
those chars together, so I would negate to mean should not match those
chars.
This is return all lines in the file. I am doing something wrong, just
do not know what. Can someone explain, please?