prototype/src/lang/regexp.js

6 lines
152 B
JavaScript
Raw Normal View History

2008-12-11 10:42:15 +00:00
RegExp.prototype.match = RegExp.prototype.test;
RegExp.escape = function(str) {
return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
};