- Número decimal: https://regex101.com/r/cO2gU1/2
- Números telefónicos: https://regex101.com/r/pK9yH8/1
- Nombre completon: https://regex101.com/r/qZ1gA5/1
- Dirección IP: http://regex101.com/r/rR6sA8/4
- Reemplazo del patrón: http://bit.ly/1iN2tLJ
Last active
October 1, 2015 06:08
-
-
Save paolocarrasco/dd22821c2e55618a4d15 to your computer and use it in GitHub Desktop.
Taller de Regular Expression con http://www.regexr.com/ y https://regex101.com/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Válidos | |
-------- | |
Teléfono internacional (prefijo adelante) de dos números | |
+51 (54) 430-23214 | |
+51 (54) 43023214 | |
Teléfono nacional | |
(54) 20 - 7291 | |
(54) 207 291 | |
Celular | |
938 298 123 | |
938-298-123 | |
Teléfono fijo local | |
450 1223 | |
4501223 | |
Teléfono comercial 0-80x | |
0-801-PIZZA | |
0-801-43991 | |
0 - 808 - PIZZA | |
Inválidos | |
---------- | |
combina internacional con nacional | |
(+23) 430-23214 | |
tiene letras pero no es un 0-80x | |
5 530 POLLOS | |
tiene otra separaciones que no son guiones o espacios | |
423,323 | |
423 _ 323 | |
https://regex101.com/r/pK9yH8/1^(((\+\d{2})?(\s?\-)?\s?(\(\d{1,2}\))?[\d\s-]{7,12})|(0(\s?-)?\s?80[018](\s?-)?\s?[A-Z0-9]{5}))$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form class="form-horizontal" data-ng-submit="nextStep()"> | |
<div class="form-group"> | |
<label class="control-label" for="targets" data-translate>email-send.entry-form.targets.label</label> | |
<select id="targets" class="form-control" data-ng-model="content.target" | |
data-ng-options="target.name + ' - ' + target.email for target in targets track by target.name"> | |
</select> | |
</div> | |
<div class="form-group"> | |
<label class="control-label" for="subject" data-translate>email-send.entry-form.subject.label</label> | |
<input type="text" id="subject" class="form-control" data-ng-model="content.subject" required> | |
</div> | |
<div class="form-group" data-ng-include src="contentForm"></div> | |
<div class="buttons"> | |
<button type="submit" class="btn btn-primary" data-translate>commons.buttons.preview.label</button> | |
<button type="button" class="btn btn-primary" data-ng-click="clearForm()" data-translate>commons.buttons.reset.label</button> | |
</div> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Recover the password</title> | |
</head> | |
<body> | |
<head> | |
<h1>Recover the password</h1> | |
</head> | |
<form action="#"> | |
<p>You will receive in your e-mail the instructions to recover your password.</p> | |
<input type="text" pattern="" autofocus required placeholder="Username"> | |
<br> | |
<div class="buttons"><button>Submit</button></div> | |
</form> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sueña el rey que es rey, y vive | |
con este engaño mandando, | |
disponiendo y gobernando; | |
y este aplauso, que recibe | |
prestado, en el viento escribe, | |
y en cenizas le convierte | |
la muerte, ¡desdicha fuerte! | |
¿Que hay quien intente reinar, | |
viendo que ha de despertar | |
en el sueño1 de la muerte? | |
Sueña el rico en su riqueza, | |
que más cuidados le ofrece; | |
sueña el pobre que padece | |
su miseria y su pobreza; | |
sueña el que a medrar empieza, | |
sueña el que afana y pretende, | |
sueña el que agravia y ofende, | |
y en el mundo, en conclusión, | |
todos sueñan lo que son, | |
aunque ninguno lo entiende. | |
Yo sueño que estoy aquí | |
destas prisiones cargado, | |
y soñé que en otro estado | |
más lisonjero me vi. | |
¿Qué es la vida? Un frenesí. | |
¿Qué es la vida? Una ilusión, | |
una sombra, una ficción, | |
y el mayor bien es pequeño: | |
que toda la vida es sueño, | |
y los sueños, sueños son. | |
Pedro Calderón de la Barca | |
(1600-1681) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment