开发者

Regex with curly brackets

开发者 https://www.devze.com 2023-03-31 18:48 出处:网络
I have following string: {{blabla}}{{blabla}}xyzxyz{{blabla}} What is proper regex match pattern to separate con开发者_运维知识库tent in curly brackets and put it in the array?

I have following string:

{{blabla}}{{blabla}}xyzxyz{{blabla}}

What is proper regex match pattern to separate con开发者_运维知识库tent in curly brackets and put it in the array? I am working with RegExKitLite and Objective-C. I will very appreciate your help.


Ok, I have just solved this issue. Correct match pattern is NSString *regex = "\\{\\{.*?\\}\\}";


{{.*?}} will match all content in double curly brackets.

0

精彩评论

暂无评论...
验证码 换一张
取 消