开发者

How can i match this with ruby regex {{article | image}}

It also needs to work for {{ article |image}} or any ot开发者_JAVA技巧her withespace combination inside the double braces.


Need a lot more information about exactly what you need and the type of data you are searching.

{{.*}}

This will work for both examples.

{{\s*\w+\s*\|\s*\w+\s*}}

Is much more specific.


This will match all your {{ }} content:

{{([^}]*)}}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜