Filter for Subject beginning with...

Unanswered Question
Aug 21st, 2008

Can someone help with a GUI subject filter I have defined? I've got a dictionary of subjects I'm quarantining and this one has me stumped. I need to filter subjects that begin with - [RochesterMI-Freecycle] - including the backets (not the hyphens). Any help would be appreciated. Thanks.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
kluu_ironport Thu, 08/21/2008 - 15:59

You need to add the backward slash (\) in front of special characters so that the scanning system will know to treat it as a regular bracket ([). Same goes for the close bracket.

^(?i)\[Rochestermi-freecycle\]


^ --> begin of line
\ ---> deference the next character to make it mean the literal character
(?i) ---> ignore case


Taken from the AsyncOS Advanced User Guide

The backslash character escapes special characters. Thus the
sequence \. only matches a literal period, the sequence \$ only
matches a literal dollar sign, and the sequence \^ only matches a
literal caret symbol. For example, the regular expression
^ik\.ac\.uk$ only matches the string ik.ac.uk.
Important Note: The backslash is also a special escape character for
the parser. As a result, if you want to include backslash in your regular
expression, you must use two backslashes — so that after parsing,
only one “real” backslash remains, which is then passed to the regular
expression system. So, if you wanted to match the example domain
above, you would enter ^ik\\.ac\\.uk$.


Can someone help with a GUI subject filter I have defined? I've got a dictionary of subjects I'm quarantining and this one has me stumped. I need to filter subjects that begin with - [RochesterMI-Freecycle] - including the backets (not the hyphens). Any help would be appreciated. Thanks.

Actions

This Discussion