freeCodeCamp/guide/english/certifications/javascript-algorithms-and-d.../regular-expressions/match-all-letters-and-numbers/index.md

19 lines
959 B
Markdown
Raw Normal View History

---
title: Match All Letters and Numbers
---
The Problem
Use the shorthand character class \w to count the number of alphanumeric characters in various quotes and strings.
Solution
let quoteSample = "The five boxing wizards jump quickly.";
let alphabetRegexV2 = /\w/gi; // Change this line
let result = quoteSample.match(alphabetRegexV2).length;
## Match All Letters and Numbers
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-all-letters-and-numbers/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->