## The EOL_SPAN_REGEXP Tag

The `EOL_SPAN_REGEXP` rule is similar to the `EOL_SPAN` rule except the match sequence is taken to be a regular expression. In addition to the attributes supported by the `EOL_SPAN` 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.

Regular expression syntax is described in Appendix E, Regular Expressions.

Here is an `EOL_SPAN_REGEXP` that highlights MS-DOS batch file comments, which start with `REM`, followed by any whitespace character, and extend until the end of the line:

    <EOL_SPAN_REGEXP AT_WHITESPACE_END="TRUE" HASH_CHAR="R" TYPE="COMMENT1">REM\s</EOL_SPAN_REGEXP>