/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
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 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>
- The <tt class="literal">SEQ_REGEXP</tt> rule is similar to the
- <tt class="literal">SEQ</tt> rule except the match sequence is taken to be
- a regular expression. In addition to the attributes supported by
- the <tt class="literal">SEQ</tt> tag, the
- <tt class="literal">HASH_CHAR</tt> 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.
- </p><p>
- Here is an example of a <tt class="literal">SEQ_REGEXP</tt> rule that highlights
- Perl's matcher constructions such as <tt class="literal">m/(.+):(\d+):(.+)/</tt>:
- </p><table border="0" bgcolor="#E0E0E0"><tr><td><pre class="programlisting"><SEQ_REGEXP TYPE="MARKUP"
- HASH_CHAR="m"
- AT_WORD_START="TRUE"
- >m([[:punct:]])(?:.*?[^\\])*?\1[sgiexom]*</SEQ_REGEXP></pre></td></tr></table><p>
- Regular expression syntax is described in <a href="regexps.html" title="Appendix E. Regular Expressions">Appendix E, <i>Regular Expressions</i></a>.
- </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>