Ios swift – How to get all matches for regular expression when ending character of pattern matches more than once?
Here is my input string: let input = "Hello, {un:23456} is under investigation {un:654, Bartek} along with Jason." and simple extension: extension String { func matchesFor(regularExpression: NSRegularExpression) -> [String] { let nsstring = self as NSString let matches = regularExpression.matches(in:…