What are regular expressions and why are they useful?
Regular expressions (aka regexps, regexes or RE's) are a powerful way of describing a set of addresses or sentences without having to list every single string explicitly.
However, regular expressions are derived from the world of UNIX operating systems and are not for the faint of heart. There are many books written about Regular Expressions and there is no way we can address all their uses here.
To use regular expresions with MailBlock, you must surround your RegExp with forward-slashes (i.e. / /). This will identify your entry as a regular expression.
For example, consider the following:
| /(joe|bob|fred)@somewhere.com/ |
Block mail from joe, bob, and fred at somewhere.com. |
| /.*@somewhere\.com/ |
Block mail from anyone at somewhere.com.
Note that the regexp wildcard is period-asterisk (.*) and not just asterisk (*).
Also note that the period immediately preceding the "com" must be backslashed to represent a true period and not a regular expression wildcard. |
Related Articles
No related articles were found.
Attachments
No attachments were found.
Visitor Comments