Regex compare not case-insensitive for single optional characters #78155
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
transfer candidate
The issue may belong in another repository
Description
When a case-insensitive regex contains an optional character, the optional character is not compared in a case-insensitive fashion. For instance, the regex
/ab?c/.ignoresCase()
will match"AbC"
, but will fail to match"ABC"
.Reproduction
when that code is run in a playground, the following is output:
Expected behavior
I expect all of those tests to pass.
Environment
% swiftc --version
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
Note that the tests do all pass for this form:
/a(b)?c/.ignoresCase()
The text was updated successfully, but these errors were encountered: