/[pcre]/code/trunk/doc/pcrecpp.3
ViewVC logotype

Diff of /code/trunk/doc/pcrecpp.3

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 87 by nigel, Sat Feb 24 21:41:21 2007 UTC revision 93 by nigel, Sat Feb 24 21:41:42 2007 UTC
# Line 85  The function returns true iff all of the Line 85  The function returns true iff all of the
85       number of sub-patterns, "i"th captured sub-pattern is       number of sub-patterns, "i"th captured sub-pattern is
86       ignored.       ignored.
87  .sp  .sp
88    CAVEAT: An optional sub-pattern that does not exist in the matched
89    string is assigned the empty string. Therefore, the following will
90    return false (because the empty string is not a valid number):
91    .sp
92       int number;
93       pcrecpp::RE::FullMatch("abc", "[a-z]+(\\d+)?", &number);
94    .sp
95  The matching interface supports at most 16 arguments per call.  The matching interface supports at most 16 arguments per call.
96  If you need more, consider using the more general interface  If you need more, consider using the more general interface
97  \fBpcrecpp::RE::DoMatch\fP. See \fBpcrecpp.h\fP for the signature for  \fBpcrecpp::RE::DoMatch\fP. See \fBpcrecpp.h\fP for the signature for
98  \fBDoMatch\fP.  \fBDoMatch\fP.
99  .  .
100    .SH "QUOTING METACHARACTERS"
101    .rs
102    .sp
103    You can use the "QuoteMeta" operation to insert backslashes before all
104    potentially meaningful characters in a string. The returned string, used as a
105    regular expression, will exactly match the original string.
106    .sp
107      Example:
108         string quoted = RE::QuoteMeta(unquoted);
109    .sp
110    Note that it's legal to escape a character even if it has no special meaning in
111    a regular expression -- so this function does that. (This also makes it
112    identical to the perl function of the same name; see "perldoc -f quotemeta".)
113    For example, "1.5-2.0?" becomes "1\e.5\e-2\e.0\e?".
114    .
115  .SH "PARTIAL MATCHES"  .SH "PARTIAL MATCHES"
116  .rs  .rs
117  .sp  .sp
# Line 309  string is left unaffected. Line 331  string is left unaffected.
331  .sp  .sp
332  The C++ wrapper was contributed by Google Inc.  The C++ wrapper was contributed by Google Inc.
333  .br  .br
334  Copyright (c) 2005 Google Inc.  Copyright (c) 2006 Google Inc.

Legend:
Removed from v.87  
changed lines
  Added in v.93

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12