While we’re on the topic of regular expressions, can someone confirm if the
direction that the document is taking supports naming capture groups inside
repeating patterns and automatically typing them to arrays?
let name = /
(let firstName: String <- \w+) \s
(let initials: [String] <- \w)* \s
(let lastName: String <- \w+)
/
print(type(of: name)) // => Regex<(firstName: String, initials: [Character],
lastName: String)>
On 16 Jan 2018, at 23:20, Michael Ilseman via swift-evolution
<[email protected] <mailto:[email protected]>> wrote:
> Significant leading zeros is a good point. Another would be non-default-radix.
>
>> On Jan 16, 2018, at 12:22 PM, C. Keith Ray via swift-evolution
>> <[email protected] <mailto:[email protected]>> wrote:
>>
>> people may want digits as characters in order to see zeros. parsing phone
>> numbers and social security numbers need zeros.
>>
>> C. Keith Ray
>> https://leanpub.com/wepntk <https://leanpub.com/wepntk> <- buy my book?
>> http://agilesolutionspace.blogspot.com/
>> <http://agilesolutionspace.blogspot.com/>
>> twitter: @ckeithray
>> http://www.thirdfoundationsw.com/keith_ray_resume_2014_long.pdf
>> <http://www.thirdfoundationsw.com/keith_ray_resume_2014_long.pdf>
>>
>> On Jan 16, 2018, at 11:24 AM, Eneko Alonso via swift-evolution
>> <[email protected] <mailto:[email protected]>> wrote:
>>
>>> Digits could always be inferred to be numeric (Int) and they should always
>>> be “exact” (to match "\d"):
>> _______________________________________________
>> swift-evolution mailing list
>> [email protected] <mailto:[email protected]>
>> https://lists.swift.org/mailman/listinfo/swift-evolution
>> <https://lists.swift.org/mailman/listinfo/swift-evolution>
>
> _______________________________________________
> swift-evolution mailing list
> [email protected] <mailto:[email protected]>
> https://lists.swift.org/mailman/listinfo/swift-evolution
> <https://lists.swift.org/mailman/listinfo/swift-evolution>
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution