sábado, 5 de octubre de 2013

Validaciones con expresiones Regulares

A string with at least one character but not only white spaces
(.{1,})(\S+)(\s*)
Only the characters of the alphabet:
^[a-zA-Z]+
Everything instead of digits:
^[\D]+
Everything except the given string "mystring":
^((?!mystring).)*$
http://www.cis.upenn.edu/~matuszek/General/RegexTester/regex-tester.html

No hay comentarios:

Publicar un comentario