javascript new regexp with flag

Solutions on MaxInterview for javascript new regexp with flag by the best coders in the world

showing results for - "javascript new regexp with flag"
Sarah
27 Aug 2020
1new RegExp(/ab+c/, 'i') // literal notation
2new RegExp('ab+c', 'i') // constructor
3
4const pattern='some pattern';
5new RegExp(pattern)