[swift-evolution] Empower String type with regular expression
Haravikk
swift-evolution at haravikk.me
Mon Feb 1 04:02:31 CST 2016
> On 1 Feb 2016, at 03:48, John Randolph via swift-evolution <swift-evolution at swift.org> wrote:
>
> Perl 6’s regex implementation looks like a logical progression of the grep style as we’ve come to know it over the years, but I’d really like to see Swift go with something like the Verbal Expressions approach.
>
> https://github.com/VerbalExpressions/SwiftVerbalExpressions <https://github.com/VerbalExpressions/SwiftVerbalExpressions>
>
> All the power is there, but it’s far more readable.
I like the verbal expressions syntax, could we do both? i.e- instead of mapping straight onto NSRegularExpression, could we have a Swift RegularExpression struct that can either take a traditional regular expression, or be constructed via verbal expressions? It might be mapped onto NSRegularExpression behind the scenes, but could let us use both forms easily.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160201/1ebcac23/attachment-0001.html>
More information about the swift-evolution
mailing list