GH avatar 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.

Update 14th of Aug 2019: we updated the template slightly (text inputs are passed into the functions) to improve the tests for this Bite. If you get confusing result, use Try again to start with the updated template.

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

Buy Now Login and get coding
We use Python 3.7