i need regex allow latin characters, digits , other symbols(but not whitespace)
thanks!
update:
private boolean loginpasshascorrectsymbols(string input){ if (input.matches("[a-za-z0-9\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\>\=\?\@\[\]\{\}\\\^\_\`\~]+$")){ return true; } return false; }
i hope got them all.
"[a-za-z0-9\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\>\=\?\@\[\]\{\}\\\\\^\_\`\~]+$" edit: forgot in java, regexes strings, need escape each \ given in string using \. hope didn't miss now.
"[a-za-z0-9\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\-\\.\\/\\:\\;\\<\\>\\=\\?\\@\\[\\]\\{\\}\\\\\\^\\_\\`\\~]+$"
Comments
Post a Comment