23

I've got a Gmail email filter rule set up to prevent email from various senders from going into spam.  Here's a simplified version of the rule:

Matches:
from:(abc.org.nz|def.nz|westpac|mailman|ird.govt|mybank|contact)
Do this: Never send it to Spam

As you can see, to keep it short and more generalised (not too generalised so far), I have not listed entire email addresses.

So far the above rule seems to be working for everything listed except "mybank", which still allows emails from "[email protected]" to go into spam.

Is this because the filter doesn't match on partial "words" (alphanumeric strings?), or what?

I had a quick look here, but it didn't seem to go into sufficient detail:
  https://support.google.com/mail/answer/6579?hl=en
So if you know of a link to support whatever you say, that could also help.

3
  • No need. It looks as if I simply need to include the a whole "word", in my current match, e.g. "mybanksavings", instead of just "mybank".
    – Terry
    Oct 1, 2015 at 3:51
  • So, after a bit (or even a byte) of testing, I think I now sufficiently understand how these filters work (i.e. what I've said above). One thing I don't know is, how to do searches for things like: "[email protected]" without matching "[email protected]" (e.g. "[email protected]"). I know I could use do negative conditions, but how to make it generic, rather than list all the possible things that could follow the ".com". And there's the same kind of issue with matching things at the beginning of the address.
    – Terry
    Oct 1, 2015 at 8:08
  • I see from another post that you can also create a filter by entering the conditions in Gmail's search field, then clicking the down triangle at the right-hand end of the search field, and taking it from there. That's great because you can easily test it works first.
    – Terry
    Oct 1, 2015 at 8:15

2 Answers 2

21

Gmail search doesn't support wildcards, partial words, or regular expressions. By extension, then, neither do Gmail filters. (Some information from Google Support.)

@example.com will work because @ is a word separator. But @example will match @example.com but not @examplexyz.

Some related questions here:

2
  • In this case, I think the "|" has been around for at least a year, and I still don't see it on that Advanced Operators webpage, and I think that should be the place for it.
    – Terry
    Oct 2, 2015 at 1:32
  • As this information is 4 years old, it is no longer valid. You actually CAN use regular expressions and basically anything you can use in Google Search.
    – Blairg23
    May 8, 2019 at 19:13
3

According to this article from Zapier, you can use syntax as shown below (more examples in the article):

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.