I want to include the space and only accept letters, numbers and accents and the special character > ñ . What I have done is the following:
if (primernombre.length() == 0 || a.matches(".*[^a-zñáéíóúA-ZÑÁÉÍÓÚ].*")) {
primernombre.setError("Ingrese un nombre valido. Solo letras.");
What I need is to include the space and the numbers.
For example: this is a text so far it does not accept it, and my regular expression accepts only thisis a text