hasRepeatedCaptureGroupDifference returns true if this pattern has repeated capture groups with known semantic differences. In stdlib, (a)* captures the last matched 'a', while coregex may differ.
(pattern string)
| 199 | // repeated capture groups with known semantic differences. |
| 200 | // In stdlib, (a)* captures the last matched 'a', while coregex may differ. |
| 201 | func hasRepeatedCaptureGroupDifference(pattern string) bool { |
| 202 | // Patterns with repeated capture groups that may have different behavior |
| 203 | repeatedCapturePatterns := map[string]bool{ |
| 204 | `(a)*`: true, |
| 205 | `(a)+`: true, |
| 206 | `(a)?`: true, |
| 207 | `((a|b)*)`: true, |
| 208 | `((.)*`: true, |
| 209 | } |
| 210 | return repeatedCapturePatterns[pattern] |
| 211 | } |
| 212 | |
| 213 | // =========================================================================== |
| 214 | // FuzzMatchStdlib - Fuzz Match/MatchString |
no outgoing calls
no test coverage detected