diff options
Diffstat (limited to 'utils/lib/regexp.js')
-rwxr-xr-x | utils/lib/regexp.js | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/utils/lib/regexp.js b/utils/lib/regexp.js deleted file mode 100755 index f9dca58..0000000 --- a/utils/lib/regexp.js +++ /dev/null @@ -1,12 +0,0 @@ -// RegExp - -/*** RegExp.escape - accepts a string; returns the string with regex metacharacters escaped. - the returned string can safely be used within a regex to match a literal - string. escaped characters are [, ], {, }, (, ), -, *, +, ?, ., \, ^, $, - |, #, [comma], and whitespace. -*/ -RegExp.escape = function (str) { - return str.replace(/[-[\]{}()*+?.\\^$|,#\s]/g, "\\$&"); -}; - |