I'm having a bit of difficulty figuring out a pattern that will allow anything to be entered, as long as the first character isn't a whitespace. I've tried
String pattern = "[^\\s][a-zA-Z0-9\\W ]+";"
and "([a-zA-Z0-9\\W]+)|(([a-zA-Z0-9\\W]+\\s[a-zA-Z0-9\\W]+)+)" as well as several other variants, with no success. Any help would be greatly appreciated.
I'm using Java btw
Aucun commentaire:
Enregistrer un commentaire