I have the following regex pattern and string:
var str="Is this all there is?";
var patt1=/is/gi;
I would like to just extract the main expression is (without the modifiers) from var patt1 using another regular expression, which we can call var patt2 for arguments sake.
How is this possible to do in vanilla JavaScript?