title: Swift 3.1 Get a range between two char?
body: <p>I am clearly doing something wrong, because this has newer taken me so long to do the following:(Playground code beneath).</p>
  
  <p>Note: Swift 3.1 ~</p>
  
  <p>I am just trying to get <code>123</code> out from <code>piz(123)zazz</code></p>
  
  <pre><code>let aString = "piz(123)zazz"
  
  let startBracket: Character = "("
  if let idx1 = aString.characters.index(of: startBracket) {
      let pos1 = aString.characters.distance(from: aString.startIndex, to: idx1)
      print("Found \(startBracket) at position \(pos1)")
  }
  else {
      print("Not found")
  }
  
  let endBracket: Character = ")"
  if let idx2 = aString.characters.index(of: endBracket) {
      let pos2 = aString.characters.distance(from: aString.startIndex, to: idx2)
      print("Found \(startBracket) at position \(pos2)")
  }
  else {
      print("Not found")
  }
  
  let range = pos1..&lt;pos2 // &lt;&lt; this is not working, I give up!!!
  
  let result_1 = aString.substring(with: range)
  </code></pre>