aboutsummaryrefslogtreecommitdiff
path: root/pattern_utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'pattern_utils.js')
-rw-r--r--pattern_utils.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/pattern_utils.js b/pattern_utils.js
index 3702e07..ef1e304 100644
--- a/pattern_utils.js
+++ b/pattern_utils.js
@@ -29,14 +29,12 @@ exports.patternUtils = {
*
*/
removeNonalpha: function(str) {
- var regex = /[^a-z0-9<>@]+/gi;
- return str.replace(regex, '');
+ return str.replace(/[^a-z0-9<>@]+/gi, '');
},
removeWhitespace: function(str) {
return str.replace(/\/\//gmi, '').replace(/\*/gmi, '').replace(/\s+/gmi, '');
},
replaceTokens: function(str) {
- var regex = /<.*?>/gi;
- return str.replace(regex, '.*?');
+ return str.replace(/<.*?>/gi, '.*?');
}
};