/www/tags/NOV_07_2009/htdocs/users-guide/mode-rule-eol-span-regexp.html
HTML | 21 lines | 21 code | 0 blank | 0 comment | 0 complexity | dfc8f5690a50c1939b78a0c7e681c36c MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
- <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>The EOL_SPAN_REGEXP Tag</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="jEdit 4.3 User's Guide"><link rel="up" href="writing-modes.html" title="Chapter 10. Mode Definition Syntax"><link rel="prev" href="mode-rule-eol-span.html" title="The EOL_SPAN Tag"><link rel="next" href="mode-rule-mark-prev.html" title="The MARK_PREVIOUS Tag"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">The EOL_SPAN_REGEXP Tag</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="mode-rule-eol-span.html">Prev</a> </td><th width="60%" align="center">Chapter 10. Mode Definition Syntax</th><td width="20%" align="right"> <a accesskey="n" href="mode-rule-mark-prev.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mode-rule-eol-span-regexp"></a>The EOL_SPAN_REGEXP Tag</h2></div></div></div><p>The <code class="literal">EOL_SPAN_REGEXP</code> rule is similar to the
- <code class="literal">EOL_SPAN</code> rule except the match sequence is taken to
- be a regular expression. In addition to the attributes supported by the
- <code class="literal">EOL_SPAN</code> tag, the following attributes are
- supported:</p><div class="itemizedlist"><ul type="disc"><li><p><code class="literal">HASH_CHAR</code> - a literal string which must
- be at the start of a regular expression.</p></li><li><p><code class="literal">HASH_CHARS</code> - a list of possible literal
- characters, one of which must match at the start of the regular
- expression.</p></li></ul></div><p><code class="literal">HASH_CHAR</code> and <code class="literal">HASH_CHARS</code>
- attributes are both optional, but you may only specify one, not both. If
- both are specified, <code class="literal">HASH_CHARS</code> is ignored and an
- error is shown. Whenever possible, use a literal prefix to specify a
- <code class="literal">EOL_SPAN_REGEXP</code>. If the starting prefix is always the
- same, use <code class="literal">HASH_CHAR</code> and provide as much prefix as
- possible. Only in rare cases would you omit both attributes, such as the
- case where there is no other reliable way to get the highlighting you
- need, for example, with comments in the Cobol programming
- language.</p><p>The regular expression match cannot span more than one
- line.</p><p>Regular expression syntax is described in <a class="xref" href="regexps.html" title="Appendix E. Regular Expressions">Appendix E, <i>Regular Expressions</i></a>.</p><p>Here is an <code class="literal">EOL_SPAN_REGEXP</code> that highlights
- MS-DOS batch file comments, which start with <code class="literal">REM</code>,
- followed by any whitespace character, and extend until the end of the
- line:</p><pre class="programlisting"><EOL_SPAN_REGEXP AT_WHITESPACE_END="TRUE" HASH_CHAR="REM" TYPE="COMMENT1">REM\s</EOL_SPAN_REGEXP></pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="mode-rule-eol-span.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="writing-modes.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="mode-rule-mark-prev.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The EOL_SPAN Tag </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> The MARK_PREVIOUS Tag</td></tr></table></div></body></html>