Regular Expressions 101

Community Patterns

Mustache Language parser regexp

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 - 6 years ago