0

I'd like to implement some client-side validation for a case-insensitive, blacklisting of variations on a word. For example, if the word in question is Dog, a user should not be able to enter any variation of it:

dog
doG
dOg
dOG
Dog
DoG
DOg
DOG

Was trying to experiment with a negative lookahead, i.e., ^(?!.*(?:dog|doG|dOg|dOG|Dog|DoG|DOg|DOG)) but that seems too verbose and not generic enough.

User 5842
  • 2,599
  • 6
  • 29
  • 46

0 Answers0