Regex question - messages with only a link

Forum for MailWasher Pro 7 and/or older 2011/2012 versions.
Philip Goddard
Student Sheep
Contact:
Location: Exeter, UK
Posts: 20
Joined: Sun Aug 01, 2010 7:36 am

Regex question - messages with only a link

Fri Oct 14, 2011 9:25 am

I really want to be have a filter that picks out just those messages that contain only one or more URLs in the body (though they may have additional white space and empty lines). I feel that this is something that really ought to be easy to do, but I can't figure out a way to achieve it.

I have tried the following regex (body contains regex):

[^\d\w]*http:.*?$[^\d\w]*
and the variant
[^\d\w]*http:.*$[^\d\w]*

but that filters every message containing a URL, regardless of whether it contains text before / after the URL.

I really want to specify "body IS regex", but there is no option for this. It is not enough to use the regex ^http:.*$ or ^http:.*?$, because that matches a pattern only on one line, so filtering all messages containing a URL, and I want to match a pattern in the whole message. And then again, I really want the expression also to match multiple URLs without other text in the message body.

Also, I want to filter messages that contain just a hyperlinked text string (i.e. one or more of them, with no additional text). That would require MW to look at the underlying source code for that. Any chance of doing this? If not, I suggest that thought be given to enabling this functionality in the filter 'engine' in future versions.
eddiex666
Travelling Tuatara
Posts: 42
Joined: Fri Aug 05, 2016 12:30 am

Re: Regex question - messages with only a link

Fri Mar 03, 2017 3:32 am

Hi,

Did you fix it?
am also testing to add a rexex custom filter to stop email with URL link inside that contain http:// ******* / xxx.zip
but i would likt to search for URL with .ZIP inside..

any idea?

Eddie
User avatar
Sidewinder
Weary Womble
Posts: 11676
Joined: Sun Mar 29, 2009 2:05 pm

Re: Regex question - messages with only a link

Fri Mar 03, 2017 6:18 am

eddiex666 wrote:Hi,

Did you fix it?
am also testing to add a rexex custom filter to stop email with URL link inside that contain http:// ******* / xxx.zip
but i would likt to search for URL with .ZIP inside..

any idea?

Eddie
Just try looking for .zip in the message body.
I am not a Firetrust employee. Just a MW User & Volunteer BETA Tester.
Remember "FREEDOM IS NEVER FREE" U.S.N.
DT W7 64 HP SP1 16GB Ram - LT W7 32 HP SP1 4GB Ram - iPad4 64 GB Ram WiFi/Cellular IOS 9.3 Beta 3
eddiex666
Travelling Tuatara
Posts: 42
Joined: Fri Aug 05, 2016 12:30 am

Re: Regex question - messages with only a link

Fri Mar 03, 2017 9:52 pm

Hi,
yes, i tryed that but it stops many other emails ...

. = any or something in regex , maybe just TEXT not reg.ex?

the best way is to search for http*******zip and use | to add rar|ps1|bat etc etc

what do you think?

tnx :-)

Eddie

Return to “MailWasher Pro 7”