Need clarification

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Locked
se224141
Posts: 59
Joined: Thu Nov 20, 2008 8:36 am

Need clarification

Post by se224141 »

||addthis.com^

and

.addthis.com/

What is the difference between the above two?
mrbene
Posts: 173
Joined: Tue Apr 10, 2007 10:09 pm
Location: Seattle, WA, USA
Contact:

Post by mrbene »

|| is shorthand for the regex that looks something like "http(s)?://[^/]*". So "||addthis" will match http://adthis and https://addthis. ".addthis" will match neither of those, and will require a subdomain. Also, ".addthis" will match if the pattern shows up later in the URL (as a querystring parameter, for example), whereas "||addthis" will not.

^ is shorthand for any separator, as in: "//", "/", ":", "?", "&", and a few others. As such, "addthis.com^" will match both addthis.com:80/ and addthis.com/, while "addthis.com/" will only match the second.

The documentation has more information.
Locked