who needs negative find :-)
Posted: Fri Jun 08, 2007 5:03 pm
If you're looking to use find (rather than a filter) to not see something, you could use the "not followed by" operator
For instance, if I'm in an ebooks group and I want to not see pdbs I could use
^(?!.*pdb)
which means "start of line" "not followed by" "any chars" then "pdb"
or in a movies/mpeg group, I could use
^(?!.*wmv)
to hide windows media files.
Probably not a big deal, just something I've been using for a bit and I thought maybe someone else might find it useful.
Oh - and, yes, (?!pdb.*)$ works the same way - and, actually, I'd use something more like ^(?!.*\.pdb)
edit: typo fixed
For instance, if I'm in an ebooks group and I want to not see pdbs I could use
^(?!.*pdb)
which means "start of line" "not followed by" "any chars" then "pdb"
or in a movies/mpeg group, I could use
^(?!.*wmv)
to hide windows media files.
Probably not a big deal, just something I've been using for a bit and I thought maybe someone else might find it useful.
Oh - and, yes, (?!pdb.*)$ works the same way - and, actually, I'd use something more like ^(?!.*\.pdb)
edit: typo fixed