Search code examples
regexuppercase

REGEX: Allow only UPPERCASE and some special caracters and exclude all lowercaracters accents


i've a problem with my regex here my rules :

  • authorize UPPERCASE
  • Exclude lowercase and accent
  • authorize(edited) Exclude only thoses special caracters & ' ( ) . _

my regex is actually :

/^[A-Z][A-Z\s]*[^&'()._]$/i

that's almost all I need, but it accept for exemple

POTATOé

when it shouldn't

and it doesn't accept POTATOéé which is normal

if anyone has the solution it would be very helpful


Solution

  • I finnaly find the solution

    ^[A-Z\u0500-\uFFE5А-я\s^&'()._]*$