Docsity
Docsity

Prepara tus exámenes
Prepara tus exámenes

Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity


Consigue puntos base para descargar
Consigue puntos base para descargar

Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium


Orientación Universidad
Orientación Universidad

Expresiones Regulares, Diapositivas de Algoritmos y Programación

Explicación sobre las expresiones regulares, su estructura y sintaxis

Tipo: Diapositivas

2022/2023

Subido el 10/11/2023

alcibiades-lopez
alcibiades-lopez 🇨🇴

1 documento

1 / 7

Toggle sidebar

Esta página no es visible en la vista previa

¡No te pierdas las partes importantes!

bg1
REGULAR EXPRESSION
Members:
1. Alcibiades Lopez
2. Steven Cabarcas
3. Jesith Galvis
pf3
pf4
pf5

Vista previa parcial del texto

¡Descarga Expresiones Regulares y más Diapositivas en PDF de Algoritmos y Programación solo en Docsity!

REGULAR EXPRESSION

Members:

1. Alcibiades Lopez

2. Steven Cabarcas

3. Jesith Galvis

1. What is a regular expression?

Regular expressions (often called RegExp or RegEx)
are a formula for finding certain matches within a
string of characters, that is, patterns that allow a
text search.
3. How is the syntax for a regular expression that
only allows letters and digits and the underscore
character?

The syntax of a regular expression that only allows letters and digits and the underscore character can be seen as follows:

^[a-zA-Z0-9_]+$

^[a-zA-Z0-9_]+$

In this case, the string starts with the ^ symbol. Ensures that the string starts with the allowed characters.

Brackets define the hyphenated character set that allows letters, digits, and underscores.

The + sign tells us that the set of allowed characters must appear only once in the string, but can be repeated several times.

And finally, the $ sign ensures that the string ends with the allowed characters.

  1. Create a program in Python that allows the input of a text string, using regular expressions test if it is a valid email address.