here this.pattern is an '@mention' of somebody's username
return new RegExp(`(^|\\s|> ?)@(${ this.pattern }(@(${ this.pattern }))?)`, 'gm');
i need to make this mention to be case-insensitive
here this.pattern is an '@mention' of somebody's username
return new RegExp(`(^|\\s|> ?)@(${ this.pattern }(@(${ this.pattern }))?)`, 'gm');
i need to make this mention to be case-insensitive
The case insensitive flag i
can be set:
return new RegExp(`(^|\\s|> ?)@(${ this.pattern }(@(${ this.pattern }))?)`, 'gmi');
This allows the regex to match without modifying the actual regex.