a2363fcfc68a03fa5ddefb888e4e170eab37cf96
[platform/framework/web/crosswalk-tizen.git] /
1 // Thanks to Andrew Clover:
2 // http://stackoverflow.com/questions/3561493
3 // /is-there-a-regexp-escape-function-in-javascript
4
5 'use strict';
6
7 var re = /[\-\/\\\^$*+?.()|\[\]{}]/g;
8
9 module.exports = function (str) { return String(str).replace(re, '\\$&'); };