Basically i am trying to restrict a user not to input characters that are not allowed in username box. i found that this could be implement by String.matches()
String UcharSet = "[a-zA-Z0-9-~!@#().]+";
boolean UMORN = "Username.is@example.com".matches(UcharSet);
if(UMORN != true)
UNotAllowedCharEC = "0x00000030";
as you can see i have string of characters to be allowed in my username box but somehow when i input @
it return false although i have it in my allowed string list.
and do tell should i add any other characters to be allowed for my username box.
User contributions licensed under CC BY-SA 3.0