new regexp js flags code example
Example: javascript new Regexp with flag
new RegExp(/ab+c/, 'i') // literal notation
new RegExp('ab+c', 'i') // constructor
const pattern='some pattern';
new RegExp(pattern)
new RegExp(/ab+c/, 'i') // literal notation
new RegExp('ab+c', 'i') // constructor
const pattern='some pattern';
new RegExp(pattern)