File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -371,7 +371,7 @@ A `regex` type has data members that are regular expression objects. This metafu
371371name_matcher: @regex type
372372= {
373373 regex := R"((\w+) (\w+))"; // for example: Margaret Hamilton
374- regex_no_case := R"(/(ab)+/i)";
374+ regex_no_case := R"(/(ab)+/i)"; // case insensitive match of `ab`
375375}
376376
377377main: (args) = {
@@ -382,7 +382,7 @@ main: (args) = {
382382 data = args[1];
383383 }
384384
385- // regex.match requires matches to start at the beginning the target string
385+ // regex.match requires matches to match the entire string, from start to end
386386 result := m.regex.match(data);
387387 if result.matched {
388388 // We found a match; reverse the order of the substrings
@@ -406,7 +406,7 @@ The `@regex` metafunction currently supports most of [Perl regex syntax](https:/
406406Each regex object has the type ` cpp2::regex::regular_expression ` , which is defined in ` include/cpp2regex.h2 ` . The member functions are:
407407
408408``` cpp title="Member functions for regular expressions"
409- // .match() requires matches to start at the beginning the target string
409+ // .match() requires matches to math the entire string, from start to end
410410// .search() finds a match anywhere within the target string
411411
412412match : (this , str: std::string_view) -> search_return;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ The listings are taken from the [Perl regex docs](https://perldoc.perl.org/perlr
2727| ** ` \r ` ** | Return (CR) | <span style =" color :green " >Supported</span > |
2828| ** ` \f ` ** | Form feed (FF) | <span style =" color :green " >Supported</span > |
2929| ** ` \a ` ** | Alarm (bell) (BEL) | <span style =" color :green " >Supported</span > |
30- | ** ` \3 ` ** | Escape (think troff) (ESC) | <span style =" color :green " >Supported</span > |
30+ | ** ` \e ` ** | Escape (think troff) (ESC) | <span style =" color :green " >Supported</span > |
3131| ** ` \x{} ` , ` \x00 ` ** | Character whose ordinal is the given hexadecimal number | <span style =" color :green " >Supported</span > |
3232| ** ` \o{} ` , ` \000 ` ** | Character whose ordinal is the given octal number | <span style =" color :green " >Supported</span > |
3333
You can’t perform that action at this time.
0 commit comments