I am trying to create a regex that will test a string that has been passed as an argument into a function. I’ve successfully done so using …
let x = new RegExp(strArg);
So now x is my new regex, and I can test my string, however, I’d like to ignore case in the regex, and I can’t figure out how to do so. It seems like it should be simple, but I can’t figure it out, and I’m stuck. I’ve been searching the forum and google for info on this issue, but I can’t find anything. Can anyone help point me in the right direction?