Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AndresReyesDev/eae014db666ccd7a77128d38f0ca7e07 to your computer and use it in GitHub Desktop.
Save AndresReyesDev/eae014db666ccd7a77128d38f0ca7e07 to your computer and use it in GitHub Desktop.
regex telefonos fijo chile
/^((\+?56\s)?(0?2|0?3[2-5]|0?4[1-5]|0?5[123578]|0?6[13457]|0?7[1235])?(\s2\d{6}|\s\d{6}))$/
'+56 2 2xxxxxx',
'+56 51 2xxxxxx',
'+56 51 xxxxxx',
'56 75 xxxxxx',
'56 051 xxxxxx',
'56 051 2xxxxxx',
'+56 051 2xxxxxx'
valida codigos de area nacional segun
http://www.entel.cl/ayudalinea/codigos_area_nacional.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment