summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-12-17 23:16:51 +0000
committerKarl Berry <karl@freefriends.org>2017-12-17 23:16:51 +0000
commitf95f2dab244cf167851907d2f86f66d059993afd (patch)
tree39a76c04cb5e850e6a903dcb1b6b5cbe3e9c7f7c /Master/texmf-dist/source/latex/l3kernel/l3regex.dtx
parent6980cb1a55e1d39670564d76f29436530a761cae (diff)
l3 (17dec17)
git-svn-id: svn://tug.org/texlive/trunk@46085 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3regex.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3regex.dtx44
1 files changed, 35 insertions, 9 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx
index 80aa7a25547..3808ec66d17 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -118,21 +118,21 @@
% possible, thus avoiding matching underscores.
% \item |[+-]?\d+| matches an explicit integer with at most one
% sign.
-% \item \verb*"[+-\ ]*\d+\ *" matches an explicit integer with any
+% \item \verb*"[+\-\ ]*\d+\ *" matches an explicit integer with any
% number of $+$ and $-$ signs, with spaces allowed except within the
% mantissa, and sourrounded by spaces.
-% \item \verb*"[+-\ ]*(\d+|\d*\.\d+)\ *" matches an explict integer or
+% \item \verb*"[+\-\ ]*(\d+|\d*\.\d+)\ *" matches an explict integer or
% decimal number; using \verb*"[.,]" instead of \verb*"\." would allow
% the comma as a decimal marker.
% \item
-% \verb*"[+-\ ]*(\d+|\d*\.\d+)\ *((?i)pt|in|[cem]m|ex|[bs]p|[dn]d|[pcn]c)\ *"
-% matches an explicit dimension with any unit that \TeX{} knows, where
+% \verb*"[+\-\ ]*(\d+|\d*\.\d+)\ *((?i)pt|in|[cem]m|ex|[bs]p|[dn]d|[pcn]c)\ *"
+% \allowbreak matches an explicit dimension with any unit that \TeX{} knows, where
% \verb*"(?i)" means to treat lowercase and uppercase letters
% identically.
-% \item \verb*"[+-\ ]*((?i)nan|inf|(\d+|\d*\.\d+)(\ *e[+-\ ]*\d+)?)\ *"
+% \item \verb*"[+\-\ ]*((?i)nan|inf|(\d+|\d*\.\d+)(\ *e[+-\ ]*\d+)?)\ *"
% matches an explicit floating point number or the special values
-% \verb*"nan" and \verb*"inf" (with signs).
-% \item \verb*"[+-\ ]*(\d+|\cC.)\ *" matches an explicit integer or
+% \verb*"nan" and \verb*"inf" (with signs and spaces allowed).
+% \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
@@ -143,7 +143,7 @@
% \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
+% expressions, \verb*"[+\-\(]*\d+\)*([+\-*/][+\-\(]*\d+\)*)*" matches among
% other things all valid integer expressions (made only with explicit
% integers). One should follow it with further testing.
%
@@ -663,6 +663,22 @@
% locally to \meta{tl~var}.
% \end{function}
%
+% \subsection{Constants and variables}
+%
+% \begin{variable}[added = 2017-12-11]{\l_tmpa_regex, \l_tmpb_regex}
+% Scratch regex for local assignment. These are never used by
+% the kernel code, and so are safe for use with any \LaTeX3-defined
+% function. However, they may be overwritten by other non-kernel
+% code and so should only be used for short-term storage.
+% \end{variable}
+%
+% \begin{variable}[added = 2017-12-11]{\g_tmpa_regex, \g_tmpb_regex}
+% Scratch regex for global assignment. These are never used by
+% the kernel code, and so are safe for use with any \LaTeX3-defined
+% function. However, they may be overwritten by other non-kernel
+% code and so should only be used for short-term storage.
+% \end{variable}
+%
% \subsection{Bugs, misfeatures, future work, and other possibilities}
%
% The following need to be done now.
@@ -5587,6 +5603,16 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{variable}{\l_tmpa_regex, \l_tmpb_regex, \g_tmpa_regex, \g_tmpb_regex}
+% The usual scratch space.
+% \begin{macrocode}
+\regex_new:N \l_tmpa_regex
+\regex_new:N \l_tmpb_regex
+\regex_new:N \g_tmpa_regex
+\regex_new:N \g_tmpb_regex
+% \end{macrocode}
+% \end{variable}
+%
% \begin{macro}{\regex_set:Nn, \regex_gset:Nn, \regex_const:Nn}
% Compile, then store the result in the user variable with the
% appropriate assignment function.