0

I have a javascript regular expression and want to check the case insensitive for the below,

1) My requirement is not to allow these two words(case insensitive) in a string.

^(?!.*pmca|.*co40)\b.[a-zA-Z0-9-.]*$
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
vishnu
  • 4,377
  • 15
  • 52
  • 89
  • Does this answer your question? [Case insensitive regex in JavaScript](https://stackoverflow.com/questions/3939715/case-insensitive-regex-in-javascript) – Andrew Morton Mar 29 '20 at 13:02

1 Answers1

0

Fixed the issue by using the below code,

/^(?!.*pmca|.*co40)\b.[a-z0-9-.]*$/i
vishnu
  • 4,377
  • 15
  • 52
  • 89