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
Now that we can search for just about anything, let's organize our results a bit better. Regular expressions give us indexed and named groups, both of which are super-handy.
New terms
-
([abc])
- creates a group that contains a set for the letters 'a', 'b', and 'c'. This could be later accessed from theMatch
object as.group(1)
-
(?P<name>[abc])
- creates a named group that contains a set for the letters 'a', 'b', and 'c'. This could later be accessed from theMatch
object as.group('name')
. -
.groups()
- method to show all of the groups on aMatch
object. -
re.MULTILINE
orre.M
- flag to make a pattern regard lines in your text as the beginning or end of a string. -
^
- specifies, in a pattern, the beginning of the string. -
$
- specifies, in a pattern, the end of the string.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
jayda hendrickson
3,413 Points1 Answer
-
Alfonso Quijano
15,137 Points2 Answers
-
Jimmy Sweeney
5,649 PointsNo offense, Kenneth, but this is not good instruction.
Posted by Jimmy SweeneyJimmy Sweeney
5,649 Points2 Answers
-
RWS Admin
19,205 Points1 Answer
-
PLUS
J R
Courses Plus Student 12,168 Points1 Answer
-
Ewerton Luna
Full Stack JavaScript Techdegree Graduate 24,031 Points1 Answer
-
ryanosten
PHP Development Techdegree Student 29,615 Points1 Answer
-
JS Park
15,959 Points1 Answer
-
angel moreta
2,912 Points1 Answer
-
PLUS
Jonathan Mitten
Courses Plus Student 11,197 Points2 Answers
-
PLUS
Dmitriy Ignatiev
Courses Plus Student 6,236 Points1 Answer
-
PLUS
Stephen Cole
Courses Plus Student 15,810 Points1 Answer
-
Ullas Savkoor
6,028 Points2 Answers
-
PLUS
Alejandro Ochoa
Courses Plus Student 10,671 Points1 Answer
-
fahad lashari
7,693 PointsFor anyone who is stuck on the next code challenge.
Posted by fahad lasharifahad lashari
7,693 Points3 Answers
-
benjamin siverly
3,430 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