MikeBronner
Programmer
Hi all,
I've worked myself in a bit of a pickle here, and can't quite seem to figure this one out.
Requirements: the regex must not match the string if a phrase that is being tested for is in it.
What I am Doing: I am looking at email headers and directing them appropriately. If my email does not appear in the TO string of the email, I will route it to the spam box.
My email filtering can use RegExs. By default all my mail goes into my inbox, however, I want to get all mail that doesn't have my email address in the header and route it to the spam box.
To do this I was thinking of using something similar to the "NOT IN" functionality in SQL, but can't quite figure it out:
Here are a few examples:
Unfortunately this still matches on email addresses that could be spam, i.e. that don't belong to me.
Any ideas?
Thanks a bunch!
I've worked myself in a bit of a pickle here, and can't quite seem to figure this one out.
Requirements: the regex must not match the string if a phrase that is being tested for is in it.
What I am Doing: I am looking at email headers and directing them appropriately. If my email does not appear in the TO string of the email, I will route it to the spam box.
My email filtering can use RegExs. By default all my mail goes into my inbox, however, I want to get all mail that doesn't have my email address in the header and route it to the spam box.
To do this I was thinking of using something similar to the "NOT IN" functionality in SQL, but can't quite figure it out:
Here are a few examples:
This one should not be sent to the spam bin. However, the next one should:test@email.com;myemail@myserver.com;someyahoo@test.com
The regex I have so far is this:test@email.com;someyahoo@test.com
Code:
[^(.*(vmware\.com\@emmgee\.com).*)]
Any ideas?
Thanks a bunch!