MCPcopy Create free account
hub / github.com/coregx/coregex / hasRepeatedCaptureGroupDifference

Function hasRepeatedCaptureGroupDifference

fuzz_stdlib_test.go:201–211  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

199// repeated capture groups with known semantic differences.
200// In stdlib, (a)* captures the last matched 'a', while coregex may differ.
201func 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

Callers 2

FuzzFindSubmatchStdlibFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected