fix Ox.replaceRegExp
This commit is contained in:
parent
4f65c927c5
commit
68c06a76bf
1 changed files with 1 additions and 1 deletions
|
@ -5,5 +5,5 @@ Ox.escapeRegExp <f> Escapes a string for use in a regular expression
|
||||||
@*/
|
@*/
|
||||||
// see https://developer.mozilla.org/en/JavaScript/Guide/Regular_Expressions
|
// see https://developer.mozilla.org/en/JavaScript/Guide/Regular_Expressions
|
||||||
Ox.escapeRegExp = function(string) {
|
Ox.escapeRegExp = function(string) {
|
||||||
return (string + '').replace(/([\/\\^$*+?.-|(){}[\]])/g, '\\$1');
|
return (string + '').replace(/([\/\\\^\$\*\+\?\.\-\|\(\)\{\}\[\]])/g, '\\$1');
|
||||||
};
|
};
|
Loading…
Reference in a new issue