Files

3 lines
85 B
JavaScript
Raw Permalink Normal View History

RegExp.escape = function(s) {
return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
};