I want to have an expression that targets all lines that begin with http, end with icon.ico and do not contain config.privoxy.org. In the sample list below, I would like to catch all except the third and fourth entries (from the top).
http://cdn.sstatic.net/askubuntu/img/favicon.ico
http://cdn.sstatic.net/unix/img/favicon.ico
http://config.privoxy.org/error-favicon.ico
http://config.privoxy.org/favicon.ico
http://economictimes.indiatimes.com/icons/etfavicon.ico
http://forums.linuxmint.com/images/favicon.ico
http://forums.mozillazine.org/static/common/images/favicon.ico
http://gmane.org/favicon.ico
http://mail.yimg.com/ok/u/assets/img/favicon-yhoo.ico
http://portableapps.com/favicon.ico
https://help.ubuntu.com/favicon.ico
https://www.axisbank.co.in/favicon.ico
http://user.services.openoffice.org/favicon.ico
http://www.gardnermuseum.org/favicon.ico
http://www.theregister.co.uk/favicon.ico
http://www.webupd8.org/favicon.ico
http://www.wilderssecurity.com/favicon.ico
The best I could come up with is '^.{19}[^x].*icon\.ico$'
which is a cheap workaround since x is relatively rare.
Is there a fool-proof, proper way to do what I want?
grep -v
but I need to get an expression for a content blocking add-on (SimpleBlock) in Firefox. The answer maybe in the links you've provided but I tried quite a few and failed. I'd be grateful for a solution specific to my need. – Feb 21 '12 at 14:05