Use RegExp constructor
RegExp
// multiple flags at once, global and ignore-case const pattern = new RegExp(myVar, 'gi'); myBlob.match(pattern)
← Questions Semantic Web →