Gmail Filters – Create a Filter with Special Characters

gmailgmail-filters

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?

Match:

  • "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 |"?

Best Answer

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)