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
You learned about the concept of NOT in the last video. Regular expressions also support the idea of OR. We'll cover that here.
Practice
Copy both the Match and the Exclude set of test strings from each exercise below into 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.
1 )
Match:
grizzlybear
pandabear
Exclude:
koalabear
bear
2 )
Match:
firestation
firehouse
Exclude:
firewalker
fire
3 )
Match:
farmhouse
bighouse
firehouse
Exclude:
house
4 )
Match:
projector
protractor
Exclude:
proctor
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