I'm looking for a working solution with dynamic regex in Javascript.
this solution works for me: (but is not dynamic)
new RegExp(\bal\i);
but this solution is not working:
var value = 'bal';
new RegExp('\'+value+'\i');
Could anyone help me how to adjust it to make it work? Thank you