Using RegExpr filters |

RegExpr means regular expression, and is a widely used method of specifying patterns of text within email messages.

RegExpr filters evaluate the text of an email and return an answer of true or false depending on the matches found. This enables you to specify a filter to easily identify certain kinds of email text or patterns, for example, the regexpr \d matches any digits from 0-9 in an email message.

MailWasher Pro also has an in-built RegExpr tester. When you make a filter that contains RegExpr or does not contain RegExpr as one of your rules, this button appears to the right of your filter. Click to test that particular RegExpr.

Below is a basic outline and some common examples of regular expression filters that you can use.

Character | What it represents | Example
Any | Represents the character typed, with the exception of special characters defined below | A represents A, B represents B etc
. | Any character (except line breaks) | Matches c, 3, [SPACE] etc
\d | Any digit | Matches 0, 1, 2, 3, 4, 5, 6, 7, 8 or 9
\D | Any non-digit | Matches anything except 0, 1, 2, 3, 4, 5, 6, 7, 8 or 9
^ | Beginning of line |
$ | End of line |
\t | [TAB] | \thello matches "hello" preceded by a tab
\r | Line Break [RETURN] |
\s | Whitespace | Matches any whitespace character: [SPACE], [TAB], Line Break, New Line
\S | Non whitespace | Matches any non whitespace character
\w | Word characters | Typically letters, numbers and underscores
\W | Non word characters | Matches any non word characters
\character | A character that is normally a special character | Special characters are: . # ^ $ \ ? + * | [ ] ( )
[any series of characters] | Any characters inside the brackets | [abc] matches a, b or c
[any character - another character] | Any characters within the range of characters | [any character - another character]
[^ any series of characters] | Any character except ones after the ^ | [^c3] matches any character except c or 3
? | 0 or 1 of the previous character | ba?t matches bat or bt, but not boat
* | 0 or more of the previous character | ba*t matches bt, bat, baat etc
+ | 1 or more of the previous character | ba+t matches bat, baat etc but not bt
pattern1/pattern2 | Either of the patterns specified | ba|t matches ba or t but not bat (it will match ba and then t for two matches instead of one)
(pattern)one of the special characters | Same as above, but treats the characters in the parenthesis as a group | (ba)*t match t, bat, babat but not bt

Click here if you want to view the online help for the regular expression engine that MailWasher Pro uses.

How to set up My Filters. How to add a new Filter. How to edit a Filter. How to delete a Filter. | Can you show me an example of a filter? Can I import existing filters from other programs? Can I filter foreign language emails?