0

Code:

    let regex = try NSRegularExpression(pattern: "([+-]?\\d+(\\.\\d+)?)[Ee]([+-]?\\d+)", options: [])

Now options should be of the type NSRegularExpressionOptions, how does [] conform to that?

Martin R
  • 529,903
  • 94
  • 1,240
  • 1,382
qed
  • 22,298
  • 21
  • 125
  • 196
  • Check this http://stackoverflow.com/questions/24066170/how-to-create-ns-options-style-bitmask-enumerations-in-swift – Cristik Jan 18 '16 at 13:14
  • The reason is that OptionSetType conforms to ArrayLiteralConvertible, compare http://stackoverflow.com/questions/32169597/swift-2-0-nil-or-0-enum-arguments or http://stackoverflow.com/questions/33863236/in-swift-what-does-this-specific-syntax-mean. – Martin R Jan 18 '16 at 13:22

0 Answers0