Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
- Reading Files 7:00
- Basics 4 questions
- The Basics 5 objectives
- Escape Hatches 5:23
- Escapes 4 questions
- Escapes 2 objectives
- Counts 6:05
- Phone Numbers 1 objective
- Word Length 1 objective
- Sets 5:42
- Email 1 objective
- Negation 8:20
- Negated Numbers 1 objective
- Groups 9:45
- Name Groups 1 objective
- Email Groups 2 objectives
- Compiling and Loops 6:51
- Players Dictionary and Class 2 objectives
- Review: Regular Expressions in Python 8 questions

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Exact matches and escape patterns give us flexibility for what we're looking for, but when something occurs multiple times, we have to specify it multiple times. Counts makes Python do that work for us.
New terms
-
\w{3}
- matches any three-word characters in a row. -
\w{,3}
- matches 0, 1, 2, or 3-word characters in a row. -
\w{3,}
- matches 3 or more word characters in a row. There's no upper limit. -
\w{3, 5}
- matches 3, 4, or 5-word characters in a row. -
\w?
- matches 0 or 1-word characters. -
\w*
- matches 0 or more word characters. Since there is no upper limit, this is, effectively, infinite word characters. -
\w+
- matches 1 or more word characters. Like*
, it has no upper limit but must occur at least once. -
.findall(pattern, text, flags)
- Finds all non-overlapping occurrences of thepattern
in thetext
.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
Sam Will
Python Development Techdegree Student 162 Points1 Answer
-
Duncan Hall
6,417 Points1 Answer
-
Sohail Mirza
Python Web Development Techdegree Student 5,158 Points1 Answer
-
Anthony Grodowski
4,902 Points1 Answer
-
Sahar Nasiri
7,454 Points1 Answer
-
Jeremy Justus
2,910 Points2 Answers
-
Mary Yang
1,769 Points2 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up