<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">I think they should be the same when Swift 3 release. You example is just how API will change from Swift 2 to 3. You can file a bug if you want to speed up the changing.</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">Zhaoxin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 11, 2016 at 6:13 AM, Jon Hoffman via swift-users <span dir="ltr"><<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">With Swift 3.0 Preview 2 for Linux and Xcode Beta 2 for macOS, I see a<br>
difference in the CompareOptions when I use the range(of:option:)<br>
method of the String type. For example, in Xcode I use this code:<br>
<br>
if let newMatch = str.range(of: regExFindMatchString, options:<br>
.regularExpression) {<br>
return str.substring(with: newMatch)<br>
} else {<br>
return nil<br>
}<br>
<br>
notice the .regularExpression. However in the Linux version I need to<br>
use the .regularExpressionSearch option like this:<br>
<br>
if let newMatch = str.range(of:regExFindMatchString, options:<br>
.regularExpressionSearch) {<br>
return str.substring(with: newMatch)<br>
} else {<br>
return nil<br>
}<br>
<br>
<br>
Is it safe to assume that the version that works with Xcode is going<br>
to be the correct version once Swift 3.0 is released?<br>
<br>
Thanks<br>
<br>
Jon<br>
_______________________________________________<br>
swift-users mailing list<br>
<a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br>
</blockquote></div><br></div>