Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Regular Expressions in Python Introduction to Regular Expressions Review: Regular Expressions in Python

Loh Pin Hua
Loh Pin Hua
3,160 Points

What is this?

I can't seem to pass this quiz. can you help me?

1 Answer

Carlos Federico Puebla Larregle
Carlos Federico Puebla Larregle
21,073 Points

To match the number in the string:

re.search(r'\d, 'The Mach 5')

^ that character is to don't match any of the following characters

To get the content of the group named "email" you have to do:

match_object.group('email')

to match 5 or more occurrences of a pattern {5,}

Name the following group "name".

re.search(r'(?P<name>[\s\w]+)', 'Kenneth Love')

re.VERBOSE lets you write our patterns out over multiple lines, ignoring whitespace and comments.

re.MULTILINE makes it so newlines are treated as individual strings

However I have to recommend you to re-watch the videos if something is getting you difficult times.

I hope that helps a little bit.