Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
(\{\{[\s]*.*?[\s]*\}\})
/
g

Description

returns all the handlebars elements in a line - returns {{...}} for each instance found Matches the following test {{sss}} s {{rrr}} dkdksl {{dds}} {{ dhre }} {{je ss}} returns ['{{sss}}','{{rr}}','{{dds}}','{{ dhre }}','{{je ss}}']

Submitted by anonymous - 9 years ago