Match Literal Strings, Learn Regular Expressions on freeCodeCamp 2020, Learn JS for Beginners 2020

Lesson Summary

In this lesson, we continue on our path to understanding regular expressions. In this specific lesson, we continue getting used to the idea of looking within a string for a pattern we specify. In this lesson, we also create a test string variable and a test regular expression variable. We learned in the last lesson that the regular expression uses forward slashes to contain the pattern or regular expression that we want to search for. We then use the test method to test whether or not the pattern is found within our test string. If true is returned then that pattern was found within the test string, if it returns false, then the regular expression was not found within the test string.

Subscribe To Monthly Newsletter. Chance to Win Monthly Prizes

* indicates required