Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to create a search filter when I receive automated emails .

The emails that I want to filter always contain the following format:

Gitlab | foo | bar | herp a derp

How can I create a filter for emails that meets the following requirements?


  • "Gitlab |"

But does not match emails with the subject

  • "gitlab"
  • "Gitlab"

What I have tried

subject:+"Gitlab |" 
subject:"Gitlab |"
subject:"Gitlab \|"
subject:("Gitlab |")
subject:(Gitlab |)

Yet I find that Gmail matches any email that contains the word "gitlab" in the subject, regardless if there is a "|" present.

How can I filter just emails with "Gitlab |"?

share|improve this question

migrated from superuser.com Dec 6 '13 at 2:40

This question came from our site for computer enthusiasts and power users.

Related (possible duplicate): Search for “!” in Gmail subject . There's also a Google Script in an answer which might be useful for you. – Al E. Dec 6 '13 at 4:15
up vote 3 down vote accepted

Unfortunately, you probably can't do what you want.

From About Gmail Search

Gmail doesn't recognize special search characters like square brackets, parentheses, currency symbols, the ampersand, the pound sign, and asterisks

You'll need to find some other unique information about the messages you want to filter. (Advanced Search Operators)

share|improve this answer
Recently I tried to create a filter with special characters and when I tried using a backslash (\) to escape the characters the warning about special characters wasn't shown. I have yet to determine if this works though, with or without the backslashes the emails that match are the same. – 2rs2ts Dec 28 '15 at 15:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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