Is it possible to create a Regular Expression in Procmail to filter out a link containing certain words?
For example, I would like to filter all emails that have a hyperlink with the word "unsubscribe" in it (it may not be the only word though). This would filter out a lot of newsletters sent to me in a sub-folder I can check now and again.
For example, I try this:
.*<a.*unsubscribe.*</a>.*
But that would just filter out anything with a link, with some words with unsubscribe in it (not necessarily in the link), then another closing link (not necessarily the first one after the word). It wont filter the last open hyperlink before the word unsubscribe, directly followed by the first closing hyperlink tag.
I cant find any information how to find the last occurrence of some HTML before a word, then the word, then the first occurrence of some HTML after the word, which I guess is what I need to do.