Appendix E. Regular Expressions

Regular expressions in Abyss Web Server conform to the PCRE syntax (Perl Compatible Regular Expressions). This appendix is a quick guide to understand the basics of regular expressions. For an extensive description of their syntax, refer to the PCREPATTERN section in http://pcre.org/pcre.txt.

When matching a string (a sequence of characters) with a regular expression, the following rules apply:

A set is made of characters or ranges. A range is formed by two characters with a - in the middle (as in 0-9 or a-z).

Preceding a special character with \ makes it loose its syntactic significance and match that character exactly. Outside a set, the special characters are ()[]{}.*+?^$\. Inside a set, the special characters are []\-^.

Example E-1. Examples of Regular Expressions

Example E-2. Examples of Backreferences