title: Swift Regex capture filename between brackets?
body: <p>I'm having an issue by capturing file name between brackets, The first file name captures successfully but the REST is not. </p>
  
  <pre><code>self.info = "&lt;head&gt;&lt;link rel=\"stylesheet\" type=\"text/css\" href=\"{dailyChest.css}\"&gt;&lt;/head&gt;"
  
             self.info =   "\(self.info)&lt;center&gt;&lt;div style=\"position: relative;background-image:url({toget.png}); background-size:contain;background-repeat:no-repeat;background-position: center center;width: 100%; height: 600px\"&gt;&lt;lottie-player src=\"{animate.json}\" style=\"width: 100%; margin : 0 auto\" autoplay&gt;&lt;/lottie-player&gt;&lt;div class=\"reward\"&gt;&lt;img class=\"rotate\" src=\"{vshinereward.png}\" style=\"position: absolute;width : 200%;top: -50%;left : -50%\" /&gt;&lt;div class=\"rewardBit\"&gt;50,000&lt;span&gt;pts&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/center&gt;";
  
  
  
  
          let regex   = try! NSRegularExpression(pattern: "\\{(.*?)\\}", options: [.allowCommentsAndWhitespace])
              regex.enumerateMatches(in:self.info.description, options: [], range: NSMakeRange(0, (self.info.description as NSString).length))
              {
                  (result, _, _) in
  
                  var match = (self.info.description  as NSString).substring(with: result!.range)
  
                      match = match.replacingOccurrences(of: "{", with: "", options: .literal, range: nil)
                      match = match.replacingOccurrences(of: "}", with: "", options: .literal, range: nil)
  
                  if File_cache.isExists(filename: match)
                  { print("filename \(match) exists")
                     self.info.description = self.info.description.replacingOccurrences(of: "{\(match)}", with: File_cache.get(filename: match).path, options: .literal, range: nil)
                  }else{
                      print("filename \(match) not exists")
                  }
  
              }
  </code></pre>
  
  <p>Any idea is very much appreciated.</p>