Skip to content

Commit ec1f98a

Browse files
authored
Updates for missing features in regular expressions. (#1337)
* Added handling of \G. * Added find_all method to regular expressions. * Implementation of reverse token generation. * Implementation of lookbehind parsing. * Hack for reverse matching. * Removed Iter from wrapper and added it to the generated functions. * Removed `wrap` helper. * Implementation of advanced regexes. * Added implementation for nested lookaround. * Update for regex status. * Added atomic grouping token. * Code cleanup. * Update of Regression tests. * Header update for new version. * Updates for clang. * Update for tests.
1 parent 2a36dfa commit ec1f98a

File tree

95 files changed

+26156
-14976
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+26156
-14976
lines changed

Diff for: docs/notes/regex_status.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The listings are taken from the [Perl regex docs](https://perldoc.perl.org/perlr
1515
| **`s`** | Treat the string as single line. That is, change `.` to match any character whatsoever, even a newline, which normally it would not match. | <span style="color:green">Supported</span> |
1616
| ***`x` and `xx`** | Extend your pattern's legibility by permitting whitespace and comments. For details see: [Perl regex docs: `/x` and `/xx`](https://perldoc.perl.org/perlre#/x-and-/xx). | <span style="color:green">Supported</span> |
1717
| **`n`** | Prevent the grouping metacharacters `(` and `)` from capturing. This modifier will stop `$1`, `$2`, etc. from being filled in. | <span style="color:green">Supported</span> |
18-
| **`c`** | Keep the current position during repeated matching. | <span style="color:gray">Planned</span> |
18+
| **`c`** | Keep the current position during repeated matching. | <span style="color:green">Supported</span> |
1919

2020

2121
### Escape sequences __(Complete)__
@@ -96,7 +96,7 @@ The listings are taken from the [Perl regex docs](https://perldoc.perl.org/perlr
9696
| **`\A`** | Match only at beginning of string | <span style="color:green">Supported</span> |
9797
| **`\Z`** | Match only at end of string, or before newline at the end | <span style="color:green">Supported</span> |
9898
| **`\z`** | Match only at end of string | <span style="color:green">Supported</span> |
99-
| **`\G`** | Match only at pos() (e.g. at the end-of-match position of prior m//g) | <span style="color:gray">Planned</span> |
99+
| **`\G`** | Match only at pos() (e.g. at the end-of-match position of prior m//g) | <span style="color:green">Supported</span> |
100100

101101

102102
### Capture groups __(Complete)__
@@ -128,8 +128,8 @@ The listings are taken from the [Perl regex docs](https://perldoc.perl.org/perlr
128128
| **`(?'NAME'pattern)`** | Named capture group | <span style="color:green">Supported</span> |
129129
| **`(?(condition)yes-pattern`<code>&#124;</code>`no-pattern)`** | Conditional patterns. | <span style="color:gray">Planned</span> |
130130
| **`(?(condition)yes-pattern)`** | Conditional patterns. | <span style="color:gray">Planned</span> |
131-
| **`(?>pattern)`** | Atomic patterns. (Disable backtrack.) | <span style="color:gray">Planned</span> |
132-
| **`(*atomic:pattern)`** | Atomic patterns. (Disable backtrack.) | <span style="color:gray">Planned</span> |
131+
| **`(?>pattern)`** | Atomic patterns. (Disable backtrack.) | <span style="color:green">Supported</span> |
132+
| **`(*atomic:pattern)`** | Atomic patterns. (Disable backtrack.) | <span style="color:green">Supported</span> |
133133

134134

135135
### Lookaround Assertions
@@ -142,12 +142,12 @@ The listings are taken from the [Perl regex docs](https://perldoc.perl.org/perlr
142142
| **`(?!pattern)`** | Negative look ahead. | <span style="color:green">Supported</span> |
143143
| **`(*nla:pattern)`** | Negative look ahead. | <span style="color:green">Supported</span> |
144144
| **`(*negative_lookahead:pattern)`** | Negative look ahead. | <span style="color:green">Supported</span> |
145-
| **`(?<=pattern)`** | Positive look behind. | <span style="color:gray">Planned</span> |
146-
| **`(*plb:pattern)`** | Positive look behind. | <span style="color:gray">Planned</span> |
147-
| **`(*positive_lookbehind:pattern)`** | Positive look behind. | <span style="color:gray">Planned</span> |
148-
| **`(?<!pattern)`** | Negative look behind. | <span style="color:gray">Planned</span> |
149-
| **`(*nlb:pattern)`** | Negative look behind. | <span style="color:gray">Planned</span> |
150-
| **`(*negative_lookbehind:pattern)`** | Negative look behind. | <span style="color:gray">Planned</span> |
145+
| **`(?<=pattern)`** | Positive look behind. | <span style="color:green">Supported</span> |
146+
| **`(*plb:pattern)`** | Positive look behind. | <span style="color:green">Supported</span> |
147+
| **`(*positive_lookbehind:pattern)`** | Positive look behind. | <span style="color:green">Supported</span> |
148+
| **`(?<!pattern)`** | Negative look behind. | <span style="color:green">Supported</span> |
149+
| **`(*nlb:pattern)`** | Negative look behind. | <span style="color:green">Supported</span> |
150+
| **`(*negative_lookbehind:pattern)`** | Negative look behind. | <span style="color:green">Supported</span> |
151151

152152

153153
### Special Backtracking Control Verbs

0 commit comments

Comments
 (0)