diff options
author | Paul Wankadia <junyer@google.com> | 2018-10-31 22:46:25 -0700 |
---|---|---|
committer | Paul Wankadia <junyer@google.com> | 2018-11-01 05:47:50 +0000 |
commit | d9cebde0175aa1ffd38aab9a395a038464d55ce7 (patch) | |
tree | 9ff2c464040c7f58dcb49c3a87d02395b1eca257 /re2/re2.h | |
parent | 9a227bed7a0fde418a94c967ef92d4a1fbe5e47f (diff) | |
download | regex-re2-d9cebde0175aa1ffd38aab9a395a038464d55ce7.tar.gz |
Improve the "MATCHING WITH SUBSTRING EXTRACTION" comment.
Change-Id: I0c86627f70fc145a30ae421bfccade2c333464fb
Reviewed-on: https://code-review.googlesource.com/c/35050
Reviewed-by: Paul Wankadia <junyer@google.com>
Diffstat (limited to 're2/re2.h')
-rw-r--r-- | re2/re2.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -53,9 +53,13 @@ // CHECK(RE2::FullMatch(latin1_string, RE2(latin1_pattern, RE2::Latin1))); // // ----------------------------------------------------------------------- -// MATCHING WITH SUB-STRING EXTRACTION: +// MATCHING WITH SUBSTRING EXTRACTION: // -// You can supply extra pointer arguments to extract matched subpieces. +// You can supply extra pointer arguments to extract matched substrings. +// If the match succeeds, the substrings will be converted (as necessary) +// and their values will be assigned to their pointees. If the match fails +// OR any conversion fails, the pointees will be in an indeterminate state. +// (Note that the interface conflates match failure and conversion failure.) // // Example: extracts "ruby" into "s" and 1234 into "i" // int i; |