-
Notifications
You must be signed in to change notification settings - Fork 49
Case-insensitive regex with repetitions does not match uppercase characters correctly #785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
bug
Something isn't working
Comments
Per swiftlang/swift#78155, optional characters indicated by |
natecook1000
added a commit
that referenced
this issue
Jan 6, 2025
The optimized bytecode for matching repetition of a single character overlooks case insensitivity. This resolves that by falling back to use an ASCII bitset when doing a case-insensitive match of a cased character. Fixes #785.
@natecook1000 This should fix swiftlang/swift#78155 also? |
natecook1000
added a commit
that referenced
this issue
Jan 14, 2025
The optimized bytecode for matching repetition of a single character overlooks case insensitivity. This resolves that by falling back to use an ASCII bitset when doing a case-insensitive match of a cased character. Fixes #785.
natecook1000
added a commit
that referenced
this issue
Jan 14, 2025
The optimized bytecode for matching repetition of a single character overlooks case insensitivity. This resolves that by falling back to use an ASCII bitset when doing a case-insensitive match of a cased character. Fixes #785.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: