Contenido del Curso
Regex Wizards (Project)
Group function 1/2
The group()
function in the re
module in Python is used to extract a specific group from a match object returned by methods such as search()
or finditer()
. A group is created by enclosing a part of the regular expression in parentheses()
.
Tarea
- import
re
. - Define a text variable as
"The cat in the hat."
. - Search for the first vowel value in the string using the following grammar:
[aeiou]
. - Print the output using the
group()
function.
Mark tasks as Completed
Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?
¡Gracias por tus comentarios!
The group()
function in the re
module in Python is used to extract a specific group from a match object returned by methods such as search()
or finditer()
. A group is created by enclosing a part of the regular expression in parentheses()
.
Tarea
- import
re
. - Define a text variable as
"The cat in the hat."
. - Search for the first vowel value in the string using the following grammar:
[aeiou]
. - Print the output using the
group()
function.
Mark tasks as Completed
Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Sección 1. Capítulo 5
AVAILABLE TO ULTIMATE ONLY