Post Reply 
How to test a variable against another variable?
Oct. 10, 2008, 03:28 AM
Post: #6
RE: How to test a variable against another variable?
Thank you z12. I found that trick was documented in the help file too, just inside the $TST() command section.

Each time I reread the help file, I learn something which was not noticed or understood before.

So, here is an improved filter without using a memory block file.
Code:
[Patterns]
Name = "Add cache links to Google cache results page"
Active = TRUE
URL = "$TYPE(htm)[^/]+/search\?*q=cache"
Limit = 256
Match = "This is Google*s cache of <a[^>]+>http://\1/*</a>$SET(currentHost=\1)PrxFail|"
        "(<a*</a>&&*href=$AV(http://$TST(currentHost)/\1|/\1)*)\0$SET(2= <a href="http://www.google.com/search?hl=en&q=cache:http://$GET(currentHost)/\1"><img src="http://www.google.com/favicon.ico" style="border: none;" /></a>)"
Replace = "\0\2"
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. 10, 2008 03:28 AM

Forum Jump: