Lesson

freeCodeCamp Check for All or None, Regex Pattern Tutorials 2021

Lesson Summary

In this lesson from our freeCodeCamp walkthrough, we take a look at checking the text for all or none patters. These are useful when we want to target words that are spelled in multiple ways. An example is given using the word "color" (the American version) and "colour" (the British version). Instead of creating the regular expressions for both words, we can use a single regex to find both "color" and "colour" by using the regular expression /colou?r/ to specify that the letter "u" is optional when searching text. Buy a Cool Super Hero Sticker for yourself and support us! https://BelieveRationally.com/Shop See this course and many more free online coding courses at https://wewillcode.com Vibe out to some music I created at https://ananomyx.com Check bae's epoxy resin craft store at https://valeryedoesresin.com

Subscribe To Monthly Newsletter. Chance to Win Monthly Prizes

* indicates required


Share: