Post Reply 
How to test a variable against another variable?
Oct. 11, 2008, 05:55 AM
Post: #12
RE: How to test a variable against another variable?
Since host extraction is excuted each time, there is no need to use a global var any longer. The below new version also improved the host extraction and took care of the :// encoding.

Code:
[Patterns]
Name = "Add cache links to Google cache results page {whenever,ln}081011"
Active = TRUE
URL = "$TYPE(htm)[^/]+/search\?*q=cache"
Bounds = "<a*</a>"
Limit = 256
Match = "$URL(*cache(:|%3a)(http(://|%3a%2f%2f)|)([^/&]+)\1*)"
        "(*href=$AV(http://$TST(\1)/\2|/\2)*)\3"
Replace = "\3<a href="http://www.google.com/search?q=cache:http://\1/\2"><img src="http://www.google.com/favicon.ico" style="border: none;" /></a>"
Add Thank You Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How to test a variable against another variable? - whenever - Oct. 11, 2008 05:55 AM

Forum Jump: