Git commit 2cc3de482b791aee99e651d613d8cd4924b17f23 by Yuri Chornoivan.
Committed on 04/12/2016 at 15:47.
Pushed by yurchor into branch 'master'.

Add some documentation on the new multi-digit subpattern numbers usage

M  +10   -0    doc/katepart/regular-expressions.docbook

https://commits.kde.org/kate/2cc3de482b791aee99e651d613d8cd4924b17f23

diff --git a/doc/katepart/regular-expressions.docbook 
b/doc/katepart/regular-expressions.docbook
index af07225..9c97fac 100644
--- a/doc/katepart/regular-expressions.docbook
+++ b/doc/katepart/regular-expressions.docbook
@@ -347,6 +347,16 @@ more whitespace and then an equal chunk of word 
characters.  (The
 string <literal>\1</literal> references <emphasis>the first sub pattern
 enclosed in parentheses</emphasis>)</para>
 
+<note>
+<para>To avoid ambiguities with usage of <userinput>\1</userinput> with some 
digits behind it (&eg; <userinput>\12</userinput> can be 12th subpattern or 
just the first subpattern with <userinput>2</userinput>) we use 
<userinput>\{12}</userinput> as syntax for multi-digit subpatterns.</para>
+<para>Examples:</para>
+<itemizedlist>
+<listitem><para><userinput>\{12}1</userinput> is <quote>use subpattern 
12</quote></para></listitem>
+<listitem><para><userinput>\123</userinput> is <quote>use capture 1 then 23 as 
the normal text</quote></para></listitem>
+</itemizedlist>
+
+</note>
+
 <!-- <para>See also <link linkend="backreferences">Back 
references</link>.</para> -->
 
 </sect3>

Reply via email to