The SEQ_REGEXP rule is similar to the
SEQ rule except the match sequence is taken to be
a regular expression. In addition to the attributes supported by
the SEQ tag, the
HASH_CHAR attribute must be specified. It must be set to
the first character that
the regular expression matches. This rules out using regular expressions
which can match more than one character at the start position. The regular expression match cannot span more than one line, either.
Here is an example of a SEQ_REGEXP rule that highlights
Perl's matcher constructions such as m/(.+):(\d+):(.+)/:
<SEQ_REGEXP TYPE="MARKUP"
HASH_CHAR="m"
AT_WORD_START="TRUE"
>m([[:punct:]])(?:.*?[^\\])*?\1[sgiexom]*</SEQ_REGEXP>Regular expression syntax is described in Appendix E, Regular Expressions.