[swift-evolution] [Draft] Swift implementation Regex added

Brent Royal-Gordon brent at architechies.com
Tue Jul 26 18:39:14 CDT 2016


> On Jul 25, 2016, at 11:40 AM, Joshua Alvarado via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Okay thanks for taking a look I will have a better implementation ready for August 1st. 

Something to keep in mind when you write your proposal: At least one member of the core team has expressed a desire for regular expressions to be deeply integrated into the language, with strong connections to `case` syntax and destructuring, and a Perl 6-style rethink of the syntax. This would be a much larger design than just Swift-ifying NSRegularExpression, of course.

Another route you might take is to conform the existing NSRegularExpression to the `ExpressibleByStringLiteral` protocol and then reopen the issue of alternate string literal syntaxes. String literals could be enhanced so that it's easier to write one containing backslashes and other special characters used in regular expressions. With a few other enhancements, like regex matching operators, we could get a pretty natural syntax going. Previous work in this area: <https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160418/015500.html>

-- 
Brent Royal-Gordon
Architechies



More information about the swift-evolution mailing list