You can use a character set like: [a-zA-Z]+
to match one or more letters of A-Z
ignoring case.
You could use \w
to match all "word characters" which includes [a-zA-Z_0-9]
Or, if you want to match any character that isn't a space, you could use \S
.
It depends on how you define a "character" in user input...