regular expression question
- From: Orson <moleskyca1@xxxxxxxxx>
- Date: Thu, 15 May 2008 11:48:26 -0700 (PDT)
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?
.
- Follow-Ups:
- Re: regular expression question
- From: Jürgen Exner
- Re: regular expression question
- From: Abigail
- Re: regular expression question
- From: Gunnar Hjalmarsson
- Re: regular expression question
- From: Jim Gibson
- Re: regular expression question
- Prev by Date: Re: help with auth dbi
- Next by Date: FAQ 4.43 How do I compute the difference of two arrays? How do I compute the intersection of two arrays?
- Previous by thread: FAQ 4.44 How do I test whether two arrays or hashes are equal?
- Next by thread: Re: regular expression question
- Index(es):
Relevant Pages
|