Filter site content in Omniweb using regular expressions

Aug 14, '03 10:25:00AM

Contributed by: prk

Omniweb can use regular expressions to filter banner ads, or even whole web pages. You can find it in the Preferences, in the Privacy section. There are a few examples to work from, but the gist of it is:

.*\/ads\/.*
The above will match any URL that has /ads/ in it. This should match a lot of advertisements. The .* means "anything." The \/ will match a "/", because just using a "/" has a special meaning for the regular expression. Be careful, though. You could block normal web pages with this feature.

You can read more about regular expressions on the web.

[robg adds: Regular expressions, or regex, are complex but extremely powerful ... here's a Google URL to get you started with some tutorials if you're interested in learning more. You can also use regex on Mail headers, as explained in this hint.]

Comments (5)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20030811122944784