diff options
Diffstat (limited to 'pattern_utils.js')
-rw-r--r-- | pattern_utils.js | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/pattern_utils.js b/pattern_utils.js index ce20842..3702e07 100644 --- a/pattern_utils.js +++ b/pattern_utils.js @@ -21,22 +21,22 @@ */ exports.patternUtils = { - /** - * removeNonalpha - * - * Remove all nonalphanumeric values, except for - * < and >, since they are what we use for tokens. - * - */ - removeNonalpha: function (str) { - var regex = /[^a-z0-9<>@]+/gi; - return str.replace(regex, ''); - }, - removeWhitespace: function (str) { - return str.replace(/\/\//gmi, '').replace(/\*/gmi, '').replace(/\s+/gmi, ''); - }, - replaceTokens: function (str) { - var regex = /<.*?>/gi; - return str.replace(regex, '.*?'); - } + /** + * removeNonalpha + * + * Remove all nonalphanumeric values, except for + * < and >, since they are what we use for tokens. + * + */ + removeNonalpha: function(str) { + var regex = /[^a-z0-9<>@]+/gi; + return str.replace(regex, ''); + }, + removeWhitespace: function(str) { + return str.replace(/\/\//gmi, '').replace(/\*/gmi, '').replace(/\s+/gmi, ''); + }, + replaceTokens: function(str) { + var regex = /<.*?>/gi; + return str.replace(regex, '.*?'); + } }; |