This is a question about Regular Expressions in Swift. I have found various tutorials that mention how to do searching and matching but nothing about grouping: Here is a simple Match statement: if Regex("\\w{4}").test("ABCD") { println("matches pattern") } But what if i wanted to extract the 3rd letter: if Regex("\\w{2}(\\w)\\w").text("REGX") { print("Found a match with \$1") } What is the correct