course content

Course Content

Python Basics: Regex Wizards

Group function 2/2Group function 2/2

Task

  1. Import re;
  2. Define a text variable as "123-456-7890";
  3. Search for the first vowel value in the string using the following grammar: ^\d{3}-\d{3}-\d{4}$;
  4. Print the output using the group() function.

Everything was clear?

Section 1. Chapter 6