Regular Expressions for Filters

A regular expression is a text model formed of ordinary characters (for example, letters from a to z) and special characters known as metacharacters. The model describes one or several strings that coincide when searching a text body. The regular expression is used as a template to collate a model of characters with the string being searched.

The table below includes a complete list of metacharacters and their behavior in the context of the regular expressions:





The character x


The character \


a, b, or c


Any character except a, b, or c (negation)


From A to Z inclusive


Any character


Line start


Line end


X, once or never


X, zero or more times


X, once or more times


X followed by Y


X or Y


X, as a group

Groups are enumerated by counting the brackets open from left to right. The zero group refers to the complete expression.

The \ character can be used to escape the metacharacters used in the expressions. For instance, the \\ expression represents a single \, and \( represents a parenthesis.