Files
lsp/node_modules/@hapi/hoek/lib/escapeRegex.js
Arnaud Nelissen 3af7ddab06 Initial commit
2021-11-17 11:25:08 +01:00

12 lines
198 B
JavaScript

'use strict';
const internals = {};
module.exports = function (string) {
// Escape ^$.*+-?=!:|\/()[]{},
return string.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g, '\\$&');
};