开发者

Regex with curly brackets

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜