PageRenderTime 48ms CodeModel.GetById 43ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 1<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
 2        <code class="literal">EOL_SPAN</code> rule except the match sequence is taken to
 3        be a regular expression. In addition to the attributes supported by the
 4        <code class="literal">EOL_SPAN</code> tag, the following attributes are
 5        supported:</p><div class="itemizedlist"><ul type="disc"><li><p><code class="literal">HASH_CHAR</code> - a literal string which must
 6                be at the start of a regular expression.</p></li><li><p><code class="literal">HASH_CHARS</code> - a list of possible literal
 7                characters, one of which must match at the start of the regular
 8                expression.</p></li></ul></div><p><code class="literal">HASH_CHAR</code> and <code class="literal">HASH_CHARS</code>
 9        attributes are both optional, but you may only specify one, not both. If
10        both are specified, <code class="literal">HASH_CHARS</code> is ignored and an
11        error is shown. Whenever possible, use a literal prefix to specify a
12        <code class="literal">EOL_SPAN_REGEXP</code>. If the starting prefix is always the
13        same, use <code class="literal">HASH_CHAR</code> and provide as much prefix as
14        possible. Only in rare cases would you omit both attributes, such as the
15        case where there is no other reliable way to get the highlighting you
16        need, for example, with comments in the Cobol programming
17        language.</p><p>The regular expression match cannot span more than one
18        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
19        MS-DOS batch file comments, which start with <code class="literal">REM</code>,
20        followed by any whitespace character, and extend until the end of the
21        line:</p><pre class="programlisting">&lt;EOL_SPAN_REGEXP AT_WHITESPACE_END="TRUE" HASH_CHAR="REM" TYPE="COMMENT1"&gt;REM\s&lt;/EOL_SPAN_REGEXP&gt;</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>