[wplug] simple regex

Mike Kuentz (2) JunkEmail at rapidigm.com
Wed Jun 25 19:41:13 EDT 2003


$ grep -v '@' filename 

Should do it.  -v gives you the inverse of what you are looking for.  In
your expression the ^ is interpreted as the beginning of the line.  It's not
<NOT> as I think you were trying.

Mike

-----Original Message-----
From: Duncan Hutty [mailto:duncanhutt at attbi.com] 
Sent: Wednesday, June 25, 2003 6:48 PM
To: wplug at wplug.org
Subject: [wplug] simple regex


I'm trying to parse a file for lines that do not contain the '@' character.
Some lines of the input contain this character, some do not.

grep '[^@]' prints all lines, regardless of whether they include '@' or not.

Presumably, I'm doing something silly here, perhaps someone could tell me
what?
Thanks,

-- 
Duncan Hutty
_______________________________________________
wplug mailing list
wplug at wplug.org
http://www.wplug.org/mailman/listinfo/wplug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://penguin.wplug.org/pipermail/wplug/attachments/20030625/37a3414f/attachment-0001.html


More information about the wplug mailing list