You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case-insensitive regular expressions containing repetitions (+ or *), the repeated part is not matched correctly against differently cased characters in the string to be searched.
Reproduction
func test(_ pattern:Regex<Substring>, on s:String)throws{print("\(s) contains \(try pattern.firstMatch(in: s)?.output ??"no match")")}
for s in ["ab","Ab"]{trytest(#/ab/#.ignoresCase(), on: s)trytest(#/a*b/#.ignoresCase(), on: s)trytest(#/a+b/#.ignoresCase(), on: s)}
This snippet outputs
ab contains ab
ab contains ab
ab contains ab
Ab contains Ab
Ab contains b
Ab contains no match
Expected behavior
I would expect it to output
ab contains ab
ab contains ab
ab contains ab
Ab contains Ab
Ab contains Ab
Ab contains Ab
Environment
swift-driver version: 1.115 Apple Swift version 6.0.2 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)
Target: arm64-apple-macosx15.0
Additional information
No response
The text was updated successfully, but these errors were encountered:
Description
In case-insensitive regular expressions containing repetitions (
+
or*
), the repeated part is not matched correctly against differently cased characters in the string to be searched.Reproduction
This snippet outputs
Expected behavior
I would expect it to output
Environment
swift-driver version: 1.115 Apple Swift version 6.0.2 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)
Target: arm64-apple-macosx15.0
Additional information
No response
The text was updated successfully, but these errors were encountered: