Regex for mustache-style double braces?

If you use a global search with .match, JavaScript won’t give the capture groups in its array output. As such, you need to do it twice: Once to find the {{...}} pairs, then again to extract the names from within them:

str.match(/{{\s*[\w\.]+\s*}}/g)
   .map(function(x) { return x.match(/[\w\.]+/)[0]; });

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)