Skip to content

Commit

Permalink
Javascript: Add hint to Match Everything But Letters and Numbers (fre…
Browse files Browse the repository at this point in the history
  • Loading branch information
greggubarev authored and QuincyLarson committed Oct 16, 2018
1 parent da14642 commit ad25c1f
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
---
title: Match Everything But Letters and Numbers
---
title: Match Everything But Letters and Numbers
---

## Match Everything But 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-everything-but-letters-and-numbers/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
### Problem:

We need to use the shorthand character class \W to count the number of non-alphanumeric characters in various quotes and strings.

<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>.
### Solution:

<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
```js
let quoteSample = "The five boxing wizards jump quickly.";
let nonAlphabetRegex = /\W/gi; // Change this line
let result = quoteSample.match(nonAlphabetRegex).length;
```

0 comments on commit ad25c1f

Please sign in to comment.