Syntax
The following table lists some example regular expressions, and describes matches for each expression. Regular expressions on FortiMail units use Perl-style syntax.
Regular expression syntax
Expression |
Matches |
---|---|
|
|
|
|
|
|
|
Either |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Any one of |
|
Either |
|
Any combination of one or more |
|
Any combination of one or more characters that does not contain an |
|
Any two decimal digits, such as |
|
A word (a non-empty sequence of alphanumeric characters and underscores), such as |
|
|
|
|
|
|
|
Ignores white space that is neither preceded by a backslash character nor within a character class. Use this to break up a regular expression into (slightly) more readable parts. |
/x |
Used to add regular expressions within other text. If the first character in a pattern is forward slash ( |