I have a function which sorts the data based on the value given in the input but when user enter backslash \
it's breaking down. How do I escape it.
https://jsfiddle.net/48axs3gd/
<input type="text" onblur="getSortedData(this.value)">
function getSortedData(value) {
console.log("value", value)
const regex = new RegExp(value, "i");
};