Having problem with this Match Everything But Letters and Numbers

Need help on this one please…

Your code so far


let quoteSample = "The five boxing wizards jump quickly.";
let nonAlphabetRegex =  /"123 456 7890 ABC def GHI jkl MNO pqr STU vwx YZ."\W/; // Change this line
let result = quoteSample.match(nonAlphabetRegex).length;

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/regular-expressions/match-everything-but-letters-and-numbers

In this challenge you learned about \W. Do you understand what it matches?

shortcut key to search patterns and alphanumerical characters in a storage…

I don’t really know what it matches, please help.

\w matches the characters a-z, A-Z, 0-9, an the underscore character.

\W matches every character that is not one of the above characters.

matching for opposite pattern?
Is this right?
let quoteSample = “The five boxing wizards jump quickly.”;

let nonAlphabetRegex = /[^A-Za-z0-9_]\W/; // Change this line

let result = quoteSample.match(nonAlphabetRegex).length;

You are over complicating the regex. What is the purpose of [^A-Za-z0-9_] in your regular expression?

/\w/0; got it now, thanks a lot…