Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
Learn some shortcut characters for some common character sets.
Practice
Copy both the Match and the Exclude set of test strings from each exercise below into a Regex tester like RegEx Pal or regex101. Using what you've learned so far, create a regular expression that will match all of the strings in the Match set and exclude the ones in the Exclude set.
Match:
7849
3472
8901
70502
23470
90496
Exclude:
abcde
ABCDE
2 )
Match:
1 a
2 a
3 a
4 a
5 a
8 a
9 b
Exclude:
4 c
4 E
3 )
Match:
8345 Gable
7238 Gable
2349 Table
8475 Cable
0994 Fable
1047 Zable
Exclude:
5633 gable
jklh 3able
4 )
Match:
bat
cat
data
eat
fast
12_6
Exclude:
$%#$@
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated 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