CA Service Management

Expand all | Collapse all

Maileater Mailbox Rule - Subject contains square brackets

Jump to Best Answer
  • 1.  Maileater Mailbox Rule - Subject contains square brackets

    Posted 10-08-2014 03:31 PM

    Having trouble trying to get a Maileater mailbox rule to match against an email subject containing square brackets.  Test email subject:

    RE: [Request 1127964] Domain Access Request for <test>

     

     

    Filter strings that don't appear to work:

    [ \t\r\n]Request {{object_id}}[ \t\r\n]

    [ \t\r\n\[]Request {{object_id}}[ \t\r\n]

    [ \t\r\n\\[]Request {{object_id}}[ \t\r\n]

    [ \t\r\n\%5B]Request {{object_id}}[ \t\r\n]


    Suggestions?



  • 2.  Re: Maileater Mailbox Rule - Subject contains square brackets
    Best Answer

    Posted 10-09-2014 08:41 AM

    Even though the mailobox rules aren't proper regexp they still implement some of their core functionality. This makes the square brackets meaningful for the regexp parser, so if you want to match for a literal square bracket character you need to escape it with a backslash. I can't remember if that works but there's plenty of limitations on what you can actually do and what you cannot.

    Also, it appears that you're not matching for the string you want to, in all your examples in practice you're saying that after the object_id you must have a space, tab or one of the line feeds. For testing your regexp there's plenty of offline and online solutions, an example for those would be RegEx Coach for offline and http://regex101.com/ for online.

     

    Try this for your needs and see if it works:

    \[Request {{object_id}}\]



  • 3.  Re: Maileater Mailbox Rule - Subject contains square brackets

    Posted 10-09-2014 11:31 AM

    The not quite regex syntax was throwing me off a bit.  The solution you've provided works perfectly.  Thank you very much.