Announcement

Collapse
No announcement yet.

Search email in email viewer with condition

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Search email in email viewer with condition

    Hi

    From email view I want to search for emails that DO NOT MATCH an email account or domain, for example, I want to search for all emails that do not belong to or do not contain @midominio.com .
    How can I do this? What should I type in the search field?.

    Is it necessary to use RegEx?

    Thanks.​

  • #2
    You will need to use Regular Expression to accomplish the query.

    Possibly try

    Code:
    (?!.*@midominio\.com)(\w[\w\.]*@\w+\.[\w\.]+)\b
    See demo here.

    Comment


    • #3
      Thank you Richard,

      I have tested the code and it works ok.

      If I wanted to combine the search for several different domains, how would I do it? For example, if it DOES NOT CONTAIN @mydomain1.com NOR @mydomain2.com ?.

      Thank you very much.​

      Comment


      • #4
        Maybe something like this
        Code:
        (?!.*@(midominio\.com|anotherdomain\.com))(\w[\w\.]*@\w+\.[\w\.]+)\b
        Note that there are various regex builders online that can help.
        AI LLMs (like ChatGPT) can also help build up regex.


        Comment

        Working...
        X