I'm trying to get a pattern which says:
Only numbers a-z A-Z 0-9 . + - %
Are wrong, its my code:
String regex = "[^a-zA-Z0-9_\.+-\%]";
I'm getting exception Illegal character range near index 17 at 17 index i have %, what am I doing wrong?
Aucun commentaire:
Enregistrer un commentaire