3

I want to create a filter for messages that come from x and have the subject either starting with y OR ending with z.

I know the process of creating filters, however how do I specify starting with y OR ending with z?

PS: Currently I'm using y | z which is working "halfway" because it selects either y or z.

To rephrase the question, what should I type in the Subject box?

Subject box example

4
  • 2
    I think you're out of luck here. Filters don't allow for regex expressions and have very limited wildcard support. Apparently a lot of people would like such a feature, and you can suggest they implement it.
    – ale
    Commented Aug 26, 2011 at 16:58
  • what other wildcards do we have?
    – Pacerier
    Commented Aug 26, 2011 at 20:21
  • and does @Al works?
    – Pacerier
    Commented Aug 26, 2011 at 20:21
  • (Yes, "@Al" works.) Primarily just email addresses. *@google.com will capture any email at google.com.
    – ale
    Commented Aug 26, 2011 at 20:31

1 Answer 1

2

I am not sure that I understand the question, but try:

from:x subject:y OR subject:z -subject:(y z)
3
  • 2
    That's not exactly what the OP wants. He wants something like from:x subject:y other text in subject OR subject:other text in subject z; where y and z can be anything.
    – Alex
    Commented Aug 30, 2011 at 5:30
  • Pacerier, ignore the boxes and try putting the query into the "has the words" field. As for the query itself, Gmail doesn't support wildcard searches at this time so you can't specify whether y or z are at the beginning or end of the subject. "subject:y OR subject:z" will turn up everything that has either y or z in the subject. "subject:y OR subject:z -subject:(y z)" will turn up anything that has only y, or only z, but not both y and z. Commented Sep 1, 2011 at 1:50
  • @Alex. Yes, Google really needs to buck up on better search operators. And we'd thought it's supposed to be a "search" company.... I can't even search for messages with a hyphen "-" in subject.
    – Pacerier
    Commented Apr 25, 2014 at 9:43

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.