View Single Post
What do you mean by "more selective"?

You can, of course, always use that template to only block flash ads from a certain server. E.g.: To only block flash from the server some.ad.com, use

some\.ad\.com.*\.swf$

(Explanation: Matches on any URL that contains "some.ad.com" ('.'s have to be escaped), followed by zero or more chars (".*"), followed by ".swf" at the end of the string.)

Or, just to show the power of regular expressions: ;-) If you only want to block flash files that contain "ad" in their filename, you could use:

ad[^/]*\.swf$

That means: Match anything that contains "ad" followed by a char that is not '/' ('[^/]') zero or more times ('*'), followed by ".swf" at the end of the string. You only match the filename itself, since the rest of the URL would contain a '/'. ([] is a character group. [abc] means: "One of the chars a, b, or c." Inside [], '^' means "not". So if you want to match any char that isn't '/', you can use [^/]. That itself would mean "one char that isn't '/'". An '*' means "the item before the '*', zero or more times". "a*" means "zero or more 'a's". "[dgy]*" means "zero or more times a 'd', a 'g', or a 'y'". As '.' means "any char", ".*" means "zero or more times any char". And "[^/]*" means "zero or more times any char, but not '/'".)