Skip to content

Commit 22e5d93

Browse files
committed
Small fixes after update from Herb.
1 parent 73d8439 commit 22e5d93

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/cpp2/metafunctions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ A `regex` type has data members that are regular expression objects. This metafu
371371
name_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

377377
main: (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:/
406406
Each 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

412412
match : (this, str: std::string_view) -> search_return;

docs/notes/regex_status.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)