Regular expressions in JavaScript support the idea of 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)