PageRenderTime 104ms CodeModel.GetById 100ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/www/tags/NOV_07_2009/htdocs/42docs/users-guide/mode-rule-seq-regexp.html

#
HTML | 18 lines | 18 code | 0 blank | 0 comment | 0 complexity | 662cb517c591716080517ce293ea9c36 MD5 | raw file
 1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>The SEQ_REGEXP Tag</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="jEdit 4.2 User's Guide"><link rel="up" href="writing-modes.html" title="Chapter 10. Mode Definition Syntax"><link rel="previous" href="mode-rule-seq.html" title="The SEQ Tag"><link rel="next" href="mode-rule-import.html" title="The IMPORT 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 SEQ_REGEXP Tag</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="mode-rule-seq.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-import.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-seq-regexp"></a>The SEQ_REGEXP Tag</h2></div></div><div></div></div><p>
 2   The <tt class="literal">SEQ_REGEXP</tt> rule is similar to the
 3   <tt class="literal">SEQ</tt> rule except the match sequence is taken to be
 4   a regular expression. In addition to the attributes supported by
 5   the <tt class="literal">SEQ</tt> tag, the
 6   <tt class="literal">HASH_CHAR</tt> attribute must be specified. It must be set to
 7   the first character that
 8   the regular expression matches. This rules out using regular expressions
 9   which can match more than one character at the start position. The regular expression match cannot span more than one line, either.
10  </p><p>
11   Here is an example of a <tt class="literal">SEQ_REGEXP</tt> rule that highlights
12   Perl's matcher constructions such as <tt class="literal">m/(.+):(\d+):(.+)/</tt>:
13  </p><table border="0" bgcolor="#E0E0E0"><tr><td><pre class="programlisting">&lt;SEQ_REGEXP TYPE="MARKUP"
14    HASH_CHAR="m"
15    AT_WORD_START="TRUE"
16&gt;m([[:punct:]])(?:.*?[^\\])*?\1[sgiexom]*&lt;/SEQ_REGEXP&gt;</pre></td></tr></table><p>
17   Regular expression syntax is described in <a href="regexps.html" title="Appendix E. Regular Expressions">Appendix E, <i>Regular Expressions</i></a>.
18  </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="mode-rule-seq.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-import.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The SEQ Tag </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> The IMPORT Tag</td></tr></table></div></body></html>