Combining Regular Expressions

So far, we have gone over the basics of regular expressions. By now you should know that regular expressions are used to find strings or parts of strings that match the regular expression's criteria, whether that be the length of the string, if the string has a blank space, or if a string starts with a certain character. You should also have a firm grasp on the various sequences that are used in regular expressions ( \w, $, { }, etc.). 

To get an idea of how we can combine these regular expressions, watch the video below. 




When you're done with the video, try creating your own regular expressions to describe or "match" different words or phrases. 

For example, 
  • Try making a regular expression that matches all the words that rhyme with "mouse". 
  • Try making a regular expression that matches a full name; the first name could be anything, but the last name has to be "James"
  • Try making a regular expression that matches every New York sports team.