<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">That’s open for debate in the strawman. The parenthesis are performing two tasks: delimiting a capture and grouping. If we can split these two concepts, e.g. if we have non-capturing grouping, we could require that quantifiers on a capture be “sunk” into the subpattern. This would eliminate the issue.<div class=""><br class=""></div><div class=""><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On Jan 17, 2018, at 2:08 PM, David Hart <<a href="mailto:david@hartbit.com" class="">david@hartbit.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class=""><span class=""></span></div><div class="">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?</div><div class=""><span class="pl-k" style="background-color: rgba(255, 255, 255, 0); box-sizing: border-box;"><br class=""></span></div><div class=""><span class="pl-k" style="background-color: rgba(255, 255, 255, 0); box-sizing: border-box;">let name = /</span></div><div class=""><span class="pl-k" style="background-color: rgba(255, 255, 255, 0); box-sizing: border-box;"> (let firstName: String <- \w+) \s</span></div><div class=""><span style="background-color: rgba(255, 255, 255, 0);" class=""> (</span><span class="pl-k" style="background-color: rgba(255, 255, 255, 0); box-sizing: border-box;">let</span><span style="background-color: rgba(255, 255, 255, 0);" class=""> initials</span><span class="pl-k" style="background-color: rgba(255, 255, 255, 0); box-sizing: border-box;">:</span><span style="background-color: rgba(255, 255, 255, 0);" class=""> [String]</span><span style="background-color: rgba(255, 255, 255, 0);" class=""> </span><span class="pl-k" style="background-color: rgba(255, 255, 255, 0); box-sizing: border-box;"><-</span><span style="background-color: rgba(255, 255, 255, 0);" class=""> \w</span><span style="background-color: rgba(255, 255, 255, 0);" class="">)* \s</span></div><div class=""><span style="background-color: rgba(255, 255, 255, 0);" class=""> (let lastName: String <- \w+)</span></div><div class=""><span class="pl-k" style="background-color: rgba(255, 255, 255, 0); box-sizing: border-box;"> /</span></div><div class=""><span class="pl-c1" style="background-color: rgba(255, 255, 255, 0); box-sizing: border-box;">print</span><span style="background-color: rgba(255, 255, 255, 0);" class="">(</span><span class="pl-c1" style="background-color: rgba(255, 255, 255, 0); box-sizing: border-box;">type</span><span style="background-color: rgba(255, 255, 255, 0);" class="">(</span><span class="pl-c1" style="background-color: rgba(255, 255, 255, 0); box-sizing: border-box;">of</span><span style="background-color: rgba(255, 255, 255, 0);" class="">: name)) </span><span class="pl-c" style="background-color: rgba(255, 255, 255, 0); box-sizing: border-box;"><span class="pl-c" style="box-sizing: border-box;">//</span> => Regex<(firstName: String, initials: [Character], lastName: String)></span></div><div class=""><div class=""><br class="">On 16 Jan 2018, at 23:20, Michael Ilseman via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">Significant leading zeros is a good point. Another would be non-default-radix.<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Jan 16, 2018, at 12:22 PM, C. Keith Ray via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class="">people may want digits as characters in order to see zeros. parsing phone numbers and social security numbers need zeros.<br class=""><br class=""><div class=""><div class="">C. Keith Ray</div><div class=""><a href="https://leanpub.com/wepntk" style="background-color: rgba(255, 255, 255, 0); font-size: 13pt;" class="">https://leanpub.com/wepntk</a><span style="background-color: rgba(255, 255, 255, 0); font-size: 13pt;" class=""> <- buy my book?</span></div><div class=""><a href="http://agilesolutionspace.blogspot.com/" class="">http://agilesolutionspace.blogspot.com/</a></div><div class="">twitter: @ckeithray</div><div class=""><a href="http://www.thirdfoundationsw.com/keith_ray_resume_2014_long.pdf" class="">http://www.thirdfoundationsw.com/keith_ray_resume_2014_long.pdf</a></div></div><div class=""><br class="">On Jan 16, 2018, at 11:24 AM, Eneko Alonso via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class="">Digits could always be inferred to be numeric (Int) and they should always be “exact” (to match "\d"):</div></blockquote></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class=""></div></blockquote><blockquote type="cite" class=""><div class=""><span class="">_______________________________________________</span><br class=""><span class="">swift-evolution mailing list</span><br class=""><span class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a></span><br class=""><span class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br class=""></div></blockquote></div></div></div></div></blockquote></div><br class=""></div></body></html>