\helpref{wxRegEx}{wxregex}
-
\subsection{Different Flavors of REs}
\helpref{Syntax of the builtin regular expression library}{wxresyn}
EREs with some significant extensions.
This manual page primarily describes
-AREs. BREs mostly exist for backward compatibility in some old programs;
-they will be discussed at the \helpref{end}{wxresynbre}. POSIX EREs are almost an exact subset
-of AREs. Features of AREs that are not present in EREs will be indicated.
+AREs. BREs mostly exist for backward compatibility in some old programs;
+they will be discussed at the \helpref{end}{wxresynbre}. POSIX EREs are almost an exact subset
+of AREs. Features of AREs that are not present in EREs will be indicated.
-
\subsection{Regular Expression Syntax}
\helpref{Syntax of the builtin regular expression library}{wxresyn}
(not quite all) of the Perl5 extensions (thanks, Henry!). Much of the description
of regular expressions below is copied verbatim from his manual entry.
-An
-ARE is one or more {\it branches}, separated by `{\bf $|$}', matching anything that matches
+An ARE is one or more {\it branches}, separated by `{\bf $|$}', matching anything that matches
any of the branches.
A branch is zero or more {\it constraints} or {\it quantified
atoms}, concatenated. It matches a match for the first, followed by a match
for the second, etc; an empty branch matches the empty string.
-A quantified
-atom is an {\it atom} possibly followed by a single {\it quantifier}. Without a quantifier,
+A quantified atom is an {\it atom} possibly followed by a single {\it quantifier}. Without a quantifier,
it matches a match for the atom. The quantifiers, and what a so-quantified
atom matches, are:
character with no other significance, matches that character.}
\end{twocollist}
-A {\it constraint}
-matches an empty string when specific conditions are met. A constraint may
+A {\it constraint} matches an empty string when specific conditions are met. A constraint may
not be followed by a quantifier. The simple constraints are as follows;
some more constraints are described later, under \helpref{Escapes}{wxresynescapes}.
An RE may not end with `{\bf $\backslash$}'.
-
\subsection{Bracket Expressions}\label{wxresynbracket}
\helpref{Syntax of the builtin regular expression library}{wxresyn}
name for either) enclosed in {\bf $[.$} and {\bf $.]$} stands for the
sequence of characters of that collating element.
-{\it wxWindows}: Currently no multi-character collating elements are defined.
+{\it wxWidgets}: Currently no multi-character collating elements are defined.
So in {\bf $[.X.]$}, {\it X} can either be a single character literal or
the name of a character. For example, the following are both identical
{\bf $[[.0.]-[.9.]]$} and {\bf $[[.zero.]-[.nine.]]$} and mean the same as
%implements only the Unicode locale. It doesn't define any equivalence classes.
%The examples above are just illustrations.)
-{\it wxWindows}: Currently no equivalence classes are defined, so
+{\it wxWidgets}: Currently no equivalence classes are defined, so
{\bf $[=X=]$} stands for just the single character {\it X}.
{\it X} can either be a single character literal or the name of a character,
see \helpref{Character Names}{wxresynchars}.
%implementation has only one locale: the Unicode locale.)
A character class may not be used as an endpoint of a range.
-{\it wxWindows:} In a non-Unicode build, these character classifications depend on the
+{\it wxWidgets}: In a non-Unicode build, these character classifications depend on the
current locale, and correspond to the values return by the ANSI C 'is'
functions: isalpha, isupper, etc. In Unicode mode they are based on
Unicode classifications, and are not affected by the current locale.
({\bf \_}). These special bracket expressions are deprecated; users of AREs should
use constraint escapes instead (see \helpref{Escapes}{wxresynescapes} below).
-
\subsection{Escapes}\label{wxresynescapes}
\helpref{Syntax of the builtin regular expression library}{wxresyn}
(i.e. the number is in the legal range for a back reference), and otherwise
is taken as octal.
-
\subsection{Metasyntax}
\helpref{Syntax of the builtin regular expression library}{wxresyn}
director) has specified that the user's input be treated as a literal string
rather than as an RE.
-
\subsection{Matching}\label{wxresynmatching}
\helpref{Syntax of the builtin regular expression library}{wxresyn}
quantified atom in it which has a preference. An RE consisting of two or
more branches connected by the {\bf $|$} operator prefers longest match.
-Subject
-to the constraints imposed by the rules for matching the whole RE, subexpressions
+Subject to the constraints imposed by the rules for matching the whole RE, subexpressions
also match the longest or shortest possible substrings, based on their
preferences, with subexpressions starting earlier in the RE taking priority
over ones starting later. Note that outer subexpressions thus take priority
this affects {\bf $^$} and {\bf \$} as with newline-sensitive matching, but not {\bf .} and bracket
expressions. This isn't very useful but is provided for symmetry.
-
\subsection{Limits And Compatibility}
\helpref{Syntax of the builtin regular expression library}{wxresyn}
implemented an early version of today's EREs. There are four incompatibilities between {\it regexp}'s
near-EREs (`RREs' for short) and AREs. In roughly increasing order of significance:
{\itemize
-\item
-In AREs, {\bf $\backslash$} followed by an alphanumeric character is either an escape or
+\item In AREs, {\bf $\backslash$} followed by an alphanumeric character is either an escape or
an error, while in RREs, it was just another way of writing the alphanumeric.
This should not be a problem because there was no reason to write such
a sequence in RREs.
-\item%
-{\bf \{} followed by a digit in an ARE is the beginning of
+\item {\bf \{} followed by a digit in an ARE is the beginning of
a bound, while in RREs, {\bf \{} was always an ordinary character. Such sequences
should be rare, and will often result in an error because following characters
will not look like a valid bound.
-\item%
-In AREs, {\bf $\backslash$} remains a special character
+\item In AREs, {\bf $\backslash$} remains a special character
within `{\bf $[]$}', so a literal {\bf $\backslash$} within {\bf $[]$} must be
written `{\bf $\backslash\backslash$}'. {\bf $\backslash\backslash$} also gives a literal
{\bf $\backslash$} within {\bf $[]$} in RREs, but only truly paranoid programmers routinely doubled
the backslash.
-\item%
-AREs report the longest/shortest match for the RE, rather
+\item AREs report the longest/shortest match for the RE, rather
than the first found in a specified search order. This may affect some RREs
which were written in the expectation that the first match would be reported.
(The careful crafting of RREs to optimize the search order for fast matching
will need rewriting.)
}
-
\subsection{Basic Regular Expressions}\label{wxresynbre}
\helpref{Syntax of the builtin regular expression library}{wxresyn}
for {\bf $[[:<:]]$} and {\bf $[[:>:]]$} respectively;
no other escapes are available.
-
\subsection{Regular Expression Character Names}\label{wxresynchars}
\helpref{Syntax of the builtin regular expression library}{wxresyn}
\twocolitem{number-sign}{'\#'}
\twocolitem{dollar-sign}{'\$'}
\twocolitem{percent-sign}{'\%'}
-\twocolitem{ampersand}{'&'}
+\twocolitem{ampersand}{'\&'}
\twocolitem{apostrophe}{'$\backslash$''}
\twocolitem{left-parenthesis}{'('}
\twocolitem{right-parenthesis}{')'}
\twocolitem{grave-accent}{'`'}
\twocolitem{left-brace}{'\{'}
\twocolitem{left-curly-bracket}{'\{'}
-\twocolitem{vertical-line}{'\|'}
+\twocolitem{vertical-line}{'$|$'}
\twocolitem{right-brace}{'\}'}
\twocolitem{right-curly-bracket}{'\}'}
-\twocolitem{tilde}{'$~$'}
+\twocolitem{tilde}{'\destruct{}'}
\twocolitem{DEL}{'$\backslash$177'}
\end{twocollist}
+