From 3e42847af7834571c3d4a744d7872d0ff7fbb010 Mon Sep 17 00:00:00 2001 From: Bruno Le Floch Date: Sun, 2 Oct 2022 13:51:21 +0200 Subject: [PATCH] Clarify documentation of case-insensitive matching (fixes #1134) --- l3kernel/l3regex.dtx | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/l3kernel/l3regex.dtx b/l3kernel/l3regex.dtx index c1f668f21b..2012fff6ef 100644 --- a/l3kernel/l3regex.dtx +++ b/l3kernel/l3regex.dtx @@ -198,7 +198,7 @@ % % \subsection{Characters classes} % -% Character types. +% Character properties. % \begin{l3regex-syntax} % \item[.] A single period matches any token. % \item[\\d] Any decimal digit. @@ -413,17 +413,19 @@ % value $1$. % \end{l3regex-syntax} % -% The option |(?i)| makes the match case insensitive (identifying -% \texttt{A}--\texttt{Z} with \texttt{a}--\texttt{z}; no Unicode support -% yet). This applies until the end of the group in which it appears, and +% The option |(?i)| makes the match case insensitive (treating +% \texttt{A}--\texttt{Z} and \texttt{a}--\texttt{z} as equivalent, with +% no support yet for Unicode case changing). This +% applies until the end of the group in which it appears, and % can be reverted using |(?-i)|. For instance, in % \verb"(?i)(a(?-i)b|c)d", the letters |a| and |d| are affected by the % |i| option. Characters within ranges and classes are affected -% individually: |(?i)[Y-\\]| is equivalent to |[YZ\[\\yz]|, and -% |(?i)[^aeiou]| matches any character which is not a vowel. Neither -% character properties, nor |\c{...}| nor |\u{...}| are affected by the -% |i| option. -% ^^A \] +% individually: |(?i)[\?-B]| is equivalent to |[\?@ABab]| +% (and differs from the much larger class |[\?-b]|), and +% |(?i)[^aeiou]| matches any character which is not a vowel. +% The |i|~option has no effect on |\c{...}|, on |\u{...}|, on character +% properties, or on character classes, for instance it has no effect at +% all in |(?i)\u{l_foo_tl}\d\d[[:lower:]]|. % % \section{Syntax of the replacement text} %