Post

Replies

Boosts

Views

Activity

Regex literals in Swift Packages
So far I'm unable to use Regex literals in my Swift Packages. Xcode simply gives a syntax error and has no idea I'm trying to do Regex. This is with Xcode 14.1 and all the platforms in the Package.swift have been set to the minimum requirement (iOS 16, macOS 13, etc) as well as the swift-tools-version set to 5.7. Using the Regex type directly (try Regex("[a-z]")) does work. It's just the literals that Xcode refuses to recognize. Regex literals do work in app projects and playgrounds. Is there a setting in the Package.swift or something I'm forgetting? Thanks in advance!
2
0
1.8k
Nov ’22