Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Group function 1/2 | Regex Wizards (Project)
Regex Wizards (Project)
course content

Зміст курсу

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().

Завдання

  1. import re.
  2. Define a text variable as "The cat in the hat.".
  3. Search for the first vowel value in the string using the following grammar: [aeiou].
  4. Print the output using the group() function.

Завдання

  1. import re.
  2. Define a text variable as "The cat in the hat.".
  3. Search for the first vowel value in the string using the following grammar: [aeiou].
  4. Print the output using the group() function.

Mark tasks as Completed
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

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().

Завдання

  1. import re.
  2. Define a text variable as "The cat in the hat.".
  3. Search for the first vowel value in the string using the following grammar: [aeiou].
  4. Print the output using the group() function.

Mark tasks as Completed
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 1. Розділ 5
AVAILABLE TO ULTIMATE ONLY
We're sorry to hear that something went wrong. What happened?
some-alt