Created
November 15, 2014 16:14
-
-
Save hartbit/fa006732cdd1faeebb94 to your computer and use it in GitHub Desktop.
Regex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// without double escapes: \A([^{}]*)(?:\{([^{}/]*)(?:\/([^{}/]*))+\})?([^{}]*)\z | |
let formatRegex = NSRegularExpression(pattern: "\\A([^{}]*)(?:\\{([^{}/]*)(?:/([^{}/]*))+\\})?([^{}]*)\\z", options: .allZeros, error: nil) | |
let test = "In this line {this should be captured/and this but it isn’t/and finally this}. I don’t understand." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment