The words parameter accept regex stored as strings ONLY (used with RegExp object)
Should also directly accept RegExp object for nicer syntax and choice of flags
words:[
'string regex', // used with gm or igm flags
/litteral regex/gm,
new RegExp('custom string regex', 'm')
]
The
words
parameter accept regex stored as strings ONLY (used with RegExp object) Should also directly accept RegExp object for nicer syntax and choice of flags