[ILUG] regexp to match anything except a line that starts with
adelaney at cs.may.ie
Mon Oct 11 11:42:41 IST 2004
On Mon, 2004-10-11 at 11:38 +0200, Paul Dunne wrote:
> Caolan asked,
> I'm trying to make a regexp which will match any
> line except a line that starts with "slot:" I've got
> ^([^s]|s[^l]|sl[^o]|slo[^t]|slot[^:]).* which matches any line that
> doesn't have "slot:" in it, but lines that don't start with "slot:"
> but nevertheless contain it are still matched by the regexp. Any
> ideas ? It's got to be a regexp for other constraints.
grep -v "^slot:" filename
Aidan Delaney email: adelaney at cs.may.ie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.linux.ie/pipermail/ilug/attachments/20041011/6be68f52/attachment.pgp
More information about the ILUG