aboutsummaryrefslogtreecommitdiff
path: root/re2/re2.h
diff options
context:
space:
mode:
authorPaul Wankadia <junyer@google.com>2018-10-31 22:46:25 -0700
committerPaul Wankadia <junyer@google.com>2018-11-01 05:47:50 +0000
commitd9cebde0175aa1ffd38aab9a395a038464d55ce7 (patch)
tree9ff2c464040c7f58dcb49c3a87d02395b1eca257 /re2/re2.h
parent9a227bed7a0fde418a94c967ef92d4a1fbe5e47f (diff)
downloadregex-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.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/re2/re2.h b/re2/re2.h
index 4be959f..1b91343 100644
--- a/re2/re2.h
+++ b/re2/re2.h
@@ -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;