title: Selecting values with regex between two characters
body: <p>I need help with regex, I have added some working Playground code on what I am trying to do, to help.</p>
  
  <p>If key="id" it should return: 862
  If key="pos" is should return: -301.5, 61.7, 364.6</p>
  
  <p>My RegEx is <strong>var expression = key+"=(.*?)[^,]+"</strong> which is kinda close, but not exactly what I am wanting.</p>
  
  <p>Any help is appreciated!</p>
  
  <pre><code>import UIKit
  
  var data = "0. id=862, pos=(-301.5, 61.7, 364.6), rot=(-7.0, -2735.2, 0.0), remote=True, health=125"
  var key = "id"
  
  var expression = key+"=(.*?)[^,]+"
  var match = data.range(of: expression, options: .regularExpression);
  var value = data.substring(with: match!)
  print(value)
  </code></pre>