From 748060329567e658f3640a6480762a694feaf94e Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 27 Jan 2013 14:57:32 -0800 Subject: [PATCH] Simplify regexp that escapes regexp special characters. Former-commit-id: dde89b0f7d9cd31768eecd4ef92c0ae9d1b5d581 --- lodash.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lodash.js b/lodash.js index afca843d9..97c027a02 100644 --- a/lodash.js +++ b/lodash.js @@ -47,7 +47,7 @@ /** Used to detect if a method is native */ var reNative = RegExp('^' + (objectRef.valueOf + '') - .replace(/[.*+?^=!:${}()|[\]\/\\]/g, '\\$&') + .replace(/[.*+?^${}()|[\]\\]/g, '\\$&') .replace(/valueOf|for [^\]]+/g, '.+?') + '$' );