Bite 2. Regex Fun

Learn Python regular expressions by writing the following 3 functions.

In each function's docstring we show the expected result.

The tests verify these expected results when you hit Save + Verify. We will do a more ample regex bite later on.

Note that for parsing HTML you would use a library of some sort, this is just to train your regex skills.

331 out of 370 users completed this Bite.
Will you be Pythonista #332 to crack this Bite?
It takes an average of ~49 minutes to solve this Bite (submissions 5-240 min).
Pythonistas rate this Bite 4.89 on a 1-10 difficulty scale.
» Up for a challenge? 💪

Login and get coding
We use Python 3.7