[latex3-commits] [l3svn] r7354 - Add an example of how to discard the part between matches in replacement
noreply at latex-project.org
noreply at latex-project.org
Thu Jul 13 03:43:18 CEST 2017
Author: bruno
Date: 2017-07-13 03:43:17 +0200 (Thu, 13 Jul 2017)
New Revision: 7354
Modified:
trunk/l3kernel/l3regex.dtx
Log:
Add an example of how to discard the part between matches in replacement
Modified: trunk/l3kernel/l3regex.dtx
===================================================================
--- trunk/l3kernel/l3regex.dtx 2017-07-12 21:36:00 UTC (rev 7353)
+++ trunk/l3kernel/l3regex.dtx 2017-07-13 01:43:17 UTC (rev 7354)
@@ -135,6 +135,12 @@
% \item \verb*"[+-\ ]*(\d+|\cC.)\ *" matches an explicit integer or
% control sequence (without checking whether it is an integer
% variable).
+% \item |\G.*?\K| at the beginning of a regular expression matches and
+% discards (due to |\K|) everything between the end of the previous
+% match (|\G|) and what is matched by the rest of the regular
+% expression; this is useful in \cs{regex_replace_all:nnN} when the
+% goal is to extract matches or submatches in a finer way than with
+% \cs{regex_extract_all:nnN}.
% \end{itemize}
% While it is impossible for a regular expression to match only integer
% expressions, \verb*"[+-\(]*\d+\)*([+-*/][+-\(]*\d+\)*)*" matches among
More information about the latex3-commits
mailing list