mirror of
https://github.com/boostorg/regex.git
synced 2025-07-31 04:57:19 +02:00
Fixed typo.
[SVN r22523]
This commit is contained in:
@ -91,18 +91,18 @@
|
|||||||
<P>Parentheses serve two purposes, to group items together into a sub-expression,
|
<P>Parentheses serve two purposes, to group items together into a sub-expression,
|
||||||
and to mark what generated the match. For example the expression "(ab)*" would
|
and to mark what generated the match. For example the expression "(ab)*" would
|
||||||
match all of the string "ababab". The matching algorithms <A href="regex_match.html">
|
match all of the string "ababab". The matching algorithms <A href="regex_match.html">
|
||||||
regex_match</A> and <A href="regex_search.html">regex_search</A>
|
regex_match</A> and <A href="regex_search.html">regex_search</A> each take
|
||||||
each take an instance of <A href="match_results.html">match_results</A>
|
an instance of <A href="match_results.html">match_results</A> that reports what
|
||||||
that reports what caused the match, on exit from these functions the <A href="match_results.html">
|
caused the match, on exit from these functions the <A href="match_results.html">match_results</A>
|
||||||
match_results</A> contains information both on what the whole expression
|
contains information both on what the whole expression matched and on what each
|
||||||
matched and on what each sub-expression matched. In the example above
|
sub-expression matched. In the example above match_results[1] would contain a
|
||||||
match_results[1] would contain a pair of iterators denoting the final "ab" of
|
pair of iterators denoting the final "ab" of the matching string. It is
|
||||||
the matching string. It is permissible for sub-expressions to match null
|
permissible for sub-expressions to match null strings. If a sub-expression
|
||||||
strings. If a sub-expression takes no part in a match - for example if it is
|
takes no part in a match - for example if it is part of an alternative that is
|
||||||
part of an alternative that is not taken - then both of the iterators that are
|
not taken - then both of the iterators that are returned for that
|
||||||
returned for that sub-expression point to the end of the input string, and the <I>matched</I>
|
sub-expression point to the end of the input string, and the <I>matched</I> parameter
|
||||||
parameter for that sub-expression is <I>false</I>. Sub-expressions are indexed
|
for that sub-expression is <I>false</I>. Sub-expressions are indexed from left
|
||||||
from left to right starting from 1, sub-expression 0 is the whole expression.
|
to right starting from 1, sub-expression 0 is the whole expression.
|
||||||
</P>
|
</P>
|
||||||
<H3>Non-Marking Parenthesis
|
<H3>Non-Marking Parenthesis
|
||||||
</H3>
|
</H3>
|
||||||
@ -143,7 +143,7 @@
|
|||||||
<P>A set is a set of characters that can match any single character that is a
|
<P>A set is a set of characters that can match any single character that is a
|
||||||
member of the set. Sets are delimited by "[" and "]" and can contain literals,
|
member of the set. Sets are delimited by "[" and "]" and can contain literals,
|
||||||
character ranges, character classes, collating elements and equivalence
|
character ranges, character classes, collating elements and equivalence
|
||||||
classes. Set declarations that start with "^" contain the compliment of the
|
classes. Set declarations that start with "^" contain the complement of the
|
||||||
elements that follow.
|
elements that follow.
|
||||||
</P>
|
</P>
|
||||||
<P>Examples:
|
<P>Examples:
|
||||||
@ -682,7 +682,8 @@
|
|||||||
chosen is the one with the longest first sub-expression, if that is the same
|
chosen is the one with the longest first sub-expression, if that is the same
|
||||||
for two or more matches, then the second sub-expression will be examined and so
|
for two or more matches, then the second sub-expression will be examined and so
|
||||||
on.
|
on.
|
||||||
</P><P>
|
</P>
|
||||||
|
<P>
|
||||||
The following table examples illustrate the main differences between Perl and
|
The following table examples illustrate the main differences between Perl and
|
||||||
POSIX regular expression matching rules:
|
POSIX regular expression matching rules:
|
||||||
</P>
|
</P>
|
||||||
@ -708,24 +709,23 @@
|
|||||||
<P><CODE>a|ab</CODE></P>
|
<P><CODE>a|ab</CODE></P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD vAlign="top" width="25%">
|
<TD vAlign="top" width="25%">
|
||||||
<P><CODE>
|
<P><CODE> xaby</CODE>
|
||||||
xaby</CODE>
|
|
||||||
</P>
|
</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD vAlign="top" width="25%">
|
<TD vAlign="top" width="25%">
|
||||||
<P><CODE>
|
<P><CODE> "ab"</CODE></P>
|
||||||
"ab"</CODE></P></TD>
|
</TD>
|
||||||
<TD vAlign="top" width="25%">
|
<TD vAlign="top" width="25%">
|
||||||
<P><CODE>
|
<P><CODE> "a"</CODE></P>
|
||||||
"a"</CODE></P></TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
<TD vAlign="top" width="25%">
|
<TD vAlign="top" width="25%">
|
||||||
<P><CODE>
|
<P><CODE> .*([[:alnum:]]+).*</CODE></P>
|
||||||
.*([[:alnum:]]+).*</CODE></P></TD>
|
</TD>
|
||||||
<TD vAlign="top" width="25%">
|
<TD vAlign="top" width="25%">
|
||||||
<P><CODE>
|
<P><CODE> " abc def xyz "</CODE></P>
|
||||||
" abc def xyz "</CODE></P></TD>
|
</TD>
|
||||||
<TD vAlign="top" width="25%">
|
<TD vAlign="top" width="25%">
|
||||||
<P>$0 = " abc def xyz "<BR>
|
<P>$0 = " abc def xyz "<BR>
|
||||||
$1 = "abc"</P>
|
$1 = "abc"</P>
|
||||||
@ -737,14 +737,14 @@
|
|||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
<TD vAlign="top" width="25%">
|
<TD vAlign="top" width="25%">
|
||||||
<P><CODE>
|
<P><CODE> .*(a|xayy)</CODE></P>
|
||||||
.*(a|xayy)</CODE></P></TD>
|
</TD>
|
||||||
<TD vAlign="top" width="25%">
|
<TD vAlign="top" width="25%">
|
||||||
<P><CODE>
|
<P><CODE> zzxayyzz</CODE></P>
|
||||||
zzxayyzz</CODE></P></TD>
|
</TD>
|
||||||
<TD vAlign="top" width="25%">
|
<TD vAlign="top" width="25%">
|
||||||
<P><CODE>
|
<P><CODE> "zzxayy"</CODE></P>
|
||||||
"zzxayy"</CODE></P></TD>
|
</TD>
|
||||||
<TD vAlign="top" width="25%">
|
<TD vAlign="top" width="25%">
|
||||||
<P><CODE>"zzxa"</CODE></P>
|
<P><CODE>"zzxa"</CODE></P>
|
||||||
</TD>
|
</TD>
|
||||||
@ -753,19 +753,16 @@
|
|||||||
<P>These differences between Perl matching rules, and POSIX matching rules, mean
|
<P>These differences between Perl matching rules, and POSIX matching rules, mean
|
||||||
that these two regular expression syntaxes differ not only in the features
|
that these two regular expression syntaxes differ not only in the features
|
||||||
offered, but also in the form that the state machine takes and/or the
|
offered, but also in the form that the state machine takes and/or the
|
||||||
algorithms used to traverse the state machine.</p>
|
algorithms used to traverse the state machine.</P>
|
||||||
<HR>
|
<HR>
|
||||||
<p>Revised
|
<p>Revised
|
||||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||||
24 Oct 2003
|
24 Oct 2003
|
||||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||||
<p><i><EFBFBD> Copyright John Maddock 1998-
|
<p><i><EFBFBD> Copyright John Maddock 1998-
|
||||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||||
2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
|
||||||
<P><I>Use, modification and distribution are subject to the Boost Software License,
|
<P><I>Use, modification and distribution are subject to the Boost Software License,
|
||||||
Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A>
|
Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A>
|
||||||
or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P>
|
or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
@ -91,18 +91,18 @@
|
|||||||
<P>Parentheses serve two purposes, to group items together into a sub-expression,
|
<P>Parentheses serve two purposes, to group items together into a sub-expression,
|
||||||
and to mark what generated the match. For example the expression "(ab)*" would
|
and to mark what generated the match. For example the expression "(ab)*" would
|
||||||
match all of the string "ababab". The matching algorithms <A href="regex_match.html">
|
match all of the string "ababab". The matching algorithms <A href="regex_match.html">
|
||||||
regex_match</A> and <A href="regex_search.html">regex_search</A>
|
regex_match</A> and <A href="regex_search.html">regex_search</A> each take
|
||||||
each take an instance of <A href="match_results.html">match_results</A>
|
an instance of <A href="match_results.html">match_results</A> that reports what
|
||||||
that reports what caused the match, on exit from these functions the <A href="match_results.html">
|
caused the match, on exit from these functions the <A href="match_results.html">match_results</A>
|
||||||
match_results</A> contains information both on what the whole expression
|
contains information both on what the whole expression matched and on what each
|
||||||
matched and on what each sub-expression matched. In the example above
|
sub-expression matched. In the example above match_results[1] would contain a
|
||||||
match_results[1] would contain a pair of iterators denoting the final "ab" of
|
pair of iterators denoting the final "ab" of the matching string. It is
|
||||||
the matching string. It is permissible for sub-expressions to match null
|
permissible for sub-expressions to match null strings. If a sub-expression
|
||||||
strings. If a sub-expression takes no part in a match - for example if it is
|
takes no part in a match - for example if it is part of an alternative that is
|
||||||
part of an alternative that is not taken - then both of the iterators that are
|
not taken - then both of the iterators that are returned for that
|
||||||
returned for that sub-expression point to the end of the input string, and the <I>matched</I>
|
sub-expression point to the end of the input string, and the <I>matched</I> parameter
|
||||||
parameter for that sub-expression is <I>false</I>. Sub-expressions are indexed
|
for that sub-expression is <I>false</I>. Sub-expressions are indexed from left
|
||||||
from left to right starting from 1, sub-expression 0 is the whole expression.
|
to right starting from 1, sub-expression 0 is the whole expression.
|
||||||
</P>
|
</P>
|
||||||
<H3>Non-Marking Parenthesis
|
<H3>Non-Marking Parenthesis
|
||||||
</H3>
|
</H3>
|
||||||
@ -143,7 +143,7 @@
|
|||||||
<P>A set is a set of characters that can match any single character that is a
|
<P>A set is a set of characters that can match any single character that is a
|
||||||
member of the set. Sets are delimited by "[" and "]" and can contain literals,
|
member of the set. Sets are delimited by "[" and "]" and can contain literals,
|
||||||
character ranges, character classes, collating elements and equivalence
|
character ranges, character classes, collating elements and equivalence
|
||||||
classes. Set declarations that start with "^" contain the compliment of the
|
classes. Set declarations that start with "^" contain the complement of the
|
||||||
elements that follow.
|
elements that follow.
|
||||||
</P>
|
</P>
|
||||||
<P>Examples:
|
<P>Examples:
|
||||||
@ -682,7 +682,8 @@
|
|||||||
chosen is the one with the longest first sub-expression, if that is the same
|
chosen is the one with the longest first sub-expression, if that is the same
|
||||||
for two or more matches, then the second sub-expression will be examined and so
|
for two or more matches, then the second sub-expression will be examined and so
|
||||||
on.
|
on.
|
||||||
</P><P>
|
</P>
|
||||||
|
<P>
|
||||||
The following table examples illustrate the main differences between Perl and
|
The following table examples illustrate the main differences between Perl and
|
||||||
POSIX regular expression matching rules:
|
POSIX regular expression matching rules:
|
||||||
</P>
|
</P>
|
||||||
@ -708,24 +709,23 @@
|
|||||||
<P><CODE>a|ab</CODE></P>
|
<P><CODE>a|ab</CODE></P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD vAlign="top" width="25%">
|
<TD vAlign="top" width="25%">
|
||||||
<P><CODE>
|
<P><CODE> xaby</CODE>
|
||||||
xaby</CODE>
|
|
||||||
</P>
|
</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD vAlign="top" width="25%">
|
<TD vAlign="top" width="25%">
|
||||||
<P><CODE>
|
<P><CODE> "ab"</CODE></P>
|
||||||
"ab"</CODE></P></TD>
|
</TD>
|
||||||
<TD vAlign="top" width="25%">
|
<TD vAlign="top" width="25%">
|
||||||
<P><CODE>
|
<P><CODE> "a"</CODE></P>
|
||||||
"a"</CODE></P></TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
<TD vAlign="top" width="25%">
|
<TD vAlign="top" width="25%">
|
||||||
<P><CODE>
|
<P><CODE> .*([[:alnum:]]+).*</CODE></P>
|
||||||
.*([[:alnum:]]+).*</CODE></P></TD>
|
</TD>
|
||||||
<TD vAlign="top" width="25%">
|
<TD vAlign="top" width="25%">
|
||||||
<P><CODE>
|
<P><CODE> " abc def xyz "</CODE></P>
|
||||||
" abc def xyz "</CODE></P></TD>
|
</TD>
|
||||||
<TD vAlign="top" width="25%">
|
<TD vAlign="top" width="25%">
|
||||||
<P>$0 = " abc def xyz "<BR>
|
<P>$0 = " abc def xyz "<BR>
|
||||||
$1 = "abc"</P>
|
$1 = "abc"</P>
|
||||||
@ -737,14 +737,14 @@
|
|||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
<TD vAlign="top" width="25%">
|
<TD vAlign="top" width="25%">
|
||||||
<P><CODE>
|
<P><CODE> .*(a|xayy)</CODE></P>
|
||||||
.*(a|xayy)</CODE></P></TD>
|
</TD>
|
||||||
<TD vAlign="top" width="25%">
|
<TD vAlign="top" width="25%">
|
||||||
<P><CODE>
|
<P><CODE> zzxayyzz</CODE></P>
|
||||||
zzxayyzz</CODE></P></TD>
|
</TD>
|
||||||
<TD vAlign="top" width="25%">
|
<TD vAlign="top" width="25%">
|
||||||
<P><CODE>
|
<P><CODE> "zzxayy"</CODE></P>
|
||||||
"zzxayy"</CODE></P></TD>
|
</TD>
|
||||||
<TD vAlign="top" width="25%">
|
<TD vAlign="top" width="25%">
|
||||||
<P><CODE>"zzxa"</CODE></P>
|
<P><CODE>"zzxa"</CODE></P>
|
||||||
</TD>
|
</TD>
|
||||||
@ -753,19 +753,16 @@
|
|||||||
<P>These differences between Perl matching rules, and POSIX matching rules, mean
|
<P>These differences between Perl matching rules, and POSIX matching rules, mean
|
||||||
that these two regular expression syntaxes differ not only in the features
|
that these two regular expression syntaxes differ not only in the features
|
||||||
offered, but also in the form that the state machine takes and/or the
|
offered, but also in the form that the state machine takes and/or the
|
||||||
algorithms used to traverse the state machine.</p>
|
algorithms used to traverse the state machine.</P>
|
||||||
<HR>
|
<HR>
|
||||||
<p>Revised
|
<p>Revised
|
||||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||||
24 Oct 2003
|
24 Oct 2003
|
||||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||||
<p><i><EFBFBD> Copyright John Maddock 1998-
|
<p><i><EFBFBD> Copyright John Maddock 1998-
|
||||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||||
2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
|
||||||
<P><I>Use, modification and distribution are subject to the Boost Software License,
|
<P><I>Use, modification and distribution are subject to the Boost Software License,
|
||||||
Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A>
|
Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A>
|
||||||
or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P>
|
or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user