From 61e8a7c8bd3a68be2ef9e48bee77dd26d782cd45 Mon Sep 17 00:00:00 2001 From: Mario Kandut Date: Fri, 8 Mar 2019 23:53:49 +0100 Subject: [PATCH] add: content for this challenge (#31782) --- .../index.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/guide/english/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-everything-but-letters-and-numbers/index.md b/guide/english/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-everything-but-letters-and-numbers/index.md index c8cdc8467a..74fe122157 100644 --- a/guide/english/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-everything-but-letters-and-numbers/index.md +++ b/guide/english/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-everything-but-letters-and-numbers/index.md @@ -3,8 +3,20 @@ title: Match Everything But Letters and Numbers --- ## Match Everything But Letters and Numbers -This is a stub. Help our community expand it. -This quick style guide will help ensure your pull request gets accepted. +To finish this challenge, it's necessary to use __character classes__. - +The __\W__ matches any character that is not a word character from the basic Latin alphabet. +__Equivalent to [^A-Za-z0-9_].__ + +For example, /\W/ or /[^A-Za-z0-9_]/ matches "%" in "50%". + + + + +### Spoiiler Alert: Solution ahead +```javascript +let quoteSample = "The five boxing wizards jump quickly."; +let nonAlphabetRegex = /\W/g; // Change this line +let result = quoteSample.match(nonAlphabetRegex).length; +```