-4

I am basically trying to find a Regex against which you could test a Nickname/Pseudo after a form validation.

For exemple I want this to be allowed: "ཀུ༇ༀ" or this 0X-_my perfect name_-X0" but not this "my\tperfectname"

so no \n \t \r etc... while still keeping spaces.

nepriel
  • 17
  • 8
  • Possible duplicate of [Learning Regular Expressions](https://stackoverflow.com/questions/4736/learning-regular-expressions) – Biffen Jun 17 '19 at 11:32

1 Answers1

0

Just use the pattern:

[^\n\r\t]+

Or if you wanna be more thorough:

[^\n\r\t\f\v]+
ruohola
  • 16,015
  • 6
  • 33
  • 67