title: How to group search regular expressions using swift
body: <p>In regular expressions you can group different matches to easily "pattern match" a given match.</p>
  
  <pre><code>while match != nil {
    match = source.rangeOfString(regex, options: .RegularExpressionSearch)
    if let m = match {
      result.append(source.substringWithRange(m)
        source.replaceRange(m, with: "") 
    }
  }
  </code></pre>
  
  <p>The above works find to find a range of the match, but it cannot tell me the group. For instance if I search for words encapsulated in "" I would like to match a "word" but quickly fetch only word </p>
  
  <p>Is it possible to do so in swift?</p>