I want to escape special characters below in data
https://jsfiddle.net/xhtfpa0y/
let regex = /([\[])/g
let data = `test test test test [`;
let matches = [...data.matchAll(regex)];
console.log(matches);
It doesn’t seem to match in javascript whereas it does in regex101