From 6ff7cd470cf1f00ef60eb48412a90f060e8d4bee Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Wed, 3 Feb 2010 19:42:17 -0800 Subject: [PATCH] better regex --- mustache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mustache.js b/mustache.js index 534e336..e404e4e 100644 --- a/mustache.js +++ b/mustache.js @@ -55,7 +55,7 @@ var Mustache = function() { } var that = this; - var regex = new RegExp(this.otag + "%([A-Z0-9-]+) ?([a-z0-9]+=[a-z0-9]+)?" + var regex = new RegExp(this.otag + "%([\\w_-]+) ?([\\w]+=[\\w]+)?" + this.ctag); return template.replace(regex, function(match, pragma, options) { that.pragmas[pragma] = {};