Files
actual/node_modules/@hapi/hoek/lib/escapeRegex.js
Rich In SQL 28d4ee94dd Init
2022-10-16 20:28:33 +01:00

12 lines
198 B
JavaScript

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