We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3656fd8 commit 21434aeCopy full SHA for 21434ae
Tests/RegexTests/CompileTests.swift
@@ -589,5 +589,9 @@ extension RegexTests {
589
try expectCanOnlyMatchAtStart("(foo)?^bar", true) // The initial group must match ""
590
try expectCanOnlyMatchAtStart("(?:foo)?^bar", true)
591
try expectCanOnlyMatchAtStart("(foo)+^bar", false) // This can't actually match anywhere
592
+
593
+ // Test lookahead assertions with anchor
594
+ try expectCanOnlyMatchAtStart("(?=^)foo", true)
595
+ try expectCanOnlyMatchAtStart("(?!^)foo", false)
596
}
597
0 commit comments