Lesson

Understanding Regular Expressions on freeCodeCamp 2021, Match all Numbers Regex Pattern Matching

Lesson Summary

In this Regex lesson from freeCodeCamp's Regular Expressions course, we take a look at a shorthand character class for [0-9]. If we want to quickly create a character class that will match a digit, we can also do the character class \d. This will return the first character that is a digit. In this specific lesson, they want us to find out how many digits appear in a string. Since \d only finds the first character, we can apply a global flag to help us retrieve all the digits that appear. Support the Movement, buy a sticker, https://believerationally.com/shop Check out Bae's products and crafts https://ValeryeDoesResin.com Listen to some of my music, https://Ananomyx.com

Subscribe To Monthly Newsletter. Chance to Win Monthly Prizes

* indicates required


Share: