[Solved] Regex string match [closed]


It can be achieved with the following regex:

^[^a-z'"*&<>\/]+$

See demo

It allows any letter that is not '"*'&<>\/, and requires that there is no lowercase English letter.

  • ^ – Start of string
  • [^a-z'"*&<>\/]+ – 1 or more characters other than ', ", *, &, <, >, / or lowercase English character.
  • $ – End of string

Restricting the length can be achieved with a limiting quantifier:

^[^a-z'"*&<>\/]{3,60}$

1

solved Regex string match [closed]