jueves, 6 de diciembre de 2018

alphabeth with ñ and spaces regex

https://stackoverflow.com/questions/7373183/javascript-regex-to-accept-only-letters-spaces-and-%C3%B1




accepted
/^[ñA-Za-z _]*[ñA-Za-z][ñA-Za-z _]*$/
and
/^[\u00F1A-Za-z _]*[\u00F1A-Za-z][\u00F1A-Za-z _]*$/
should work.
Javascript regex supports \u0000 through \uFFFF.

No hay comentarios: