How to write a regex to match a “Closure” definition in Swift 5.3?

前端 未结 0 1837
滥情空心
滥情空心 2021-01-30 13:16

The Regex I have written so far is:

 let closure = try! NSRegularExpression(pattern: "\\\\B\\\\((.*)\\\\)\\\\s*->\\\\s*[a-zA-Z\\\\(\\\\)]*")
 let str         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题