Escape a few more characters for in _.escapeRegExp for better narwhal/ringo/rhino support.

This commit is contained in:
John-David Dalton
2014-03-03 09:18:49 -08:00
parent e22b2f00dc
commit 5695e0e6b6
7 changed files with 11 additions and 11 deletions

View File

@@ -49,7 +49,7 @@
* See this [article on RegExp characters](http://www.regular-expressions.info/characters.html#special)
* for more details.
*/
var reRegExpChars =/[.*+?^${()|[\\]/g;
var reRegExpChars = /[.*+?^${}()|[\]\\]/g;
/** Used to match unescaped characters in compiled string literals */
var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g;
@@ -4432,7 +4432,7 @@
/**
* Escapes the RegExp special characters "\", "^", "$", ".", "|", "?", "*",
* "+", "(", ")", "[", and "{" in `string`.
* "+", "(", ")", "[", "]", "{" and "}" in `string`.
*
* @static
* @memberOf _