Regular Expressions can be used in many of the search and filter functions throughout Alchemy CATALYST. They can also be used when developing ezParse rules.

A regular expression  is a string that describes or matches a set of strings, according to certain syntax rules. Many programming languages support regular expressions for string manipulation. A regular expression, often called a pattern, is an expression that describes a set of strings. They are usually used to give a concise description of a set, without having to list all elements. For example, the set containing the three strings Handel, Händel, and Haendel can be described by the pattern "H(ä|ae?)ndel". Herein lies the power of using Regular Expression, especially when developing ezParse rules.

Syntax

Alchemy CATALYST uses the standard boost Regular Expression parser. However it has been extended to allow nesting of expressions. This enhances their suitability to develop complex parsers for proprietary file formats.

The following syntax and guidelines should be followed when developing your own regular expressions.

Escaping

To search for a character that would normally have a special meaning in regular expression, it must be escaped.  This means that you need to tell the regular expression parser not to consider it a regular expression character, but a plain text character instead.

e.g. if a dot normally denotes 'any character' in regular expression, then to search for an actual dot character, we must escape it. To do so, place a backslash in front of the character, i.e. \.