6 lines
152 B
JavaScript
6 lines
152 B
JavaScript
|
RegExp.prototype.match = RegExp.prototype.test;
|
||
|
|
||
|
RegExp.escape = function(str) {
|
||
|
return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
|
||
|
};
|