Skip to content

Instantly share code, notes, and snippets.

@Klerith
Created January 7, 2025 16:03
Show Gist options
  • Select an option

  • Save Klerith/e0cf87e1df88853e98290e12b5b00570 to your computer and use it in GitHub Desktop.

Select an option

Save Klerith/e0cf87e1df88853e98290e12b5b00570 to your computer and use it in GitHub Desktop.
Expresiones regulares para validar elementos
static namePattern = '([a-zA-Z]+) ([a-zA-Z]+)';
static emailPattern = '^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$';
static notOnlySpacesPattern = '^[a-zA-Z0-9]+$';
@danielchirinos
Copy link

🅰️

@ErickLaraPE
Copy link

Falto agregar los caracteres ^$ en el namePattern

@regiopg
Copy link

regiopg commented Aug 1, 2025

Falto agregar los caracteres ^$ en el namePattern

excelente, también me preguntaba porque no podía controlar ese error

@mrigorir
Copy link

Muchas gracias, porfe.

@wjmmk
Copy link

wjmmk commented Oct 22, 2025

Esa es la que le cae a Fernando, para ponerlo a "PARIR" a uno... Juaz juaz juaz juaz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment