cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1125
Views
0
Helpful
2
Replies

Filter for Subject beginning with...

gstoynoff
Level 1
Level 1

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.

2 Replies 2

kluu_ironport
Level 2
Level 2

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.

gstoynoff
Level 1
Level 1

Thanks - I appreciate it.