Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
{{(?:\s*[^\s{}]+\s*|{\s*[^\s{}]+\s*}|[&#^\/>!]\s*[^\s{}]+\s*)}}
/
g

Description

Useful for parsing HTML templates written in mustache language. This regex does not support custom delimiter tags. For documentation see: http://mustache.github.io/mustache.5.html

Submitted by anonymous - 7 years ago