Regular Expressions - Match Everything But Letters and Numbers

Tell us what’s happening:
Am trying to put the same answer as you put in the Hint. but it was not checking as pass. please confirm

Your code so far

let quoteSample = "The five boxing wizards jump quickly.";
let nonAlphabetRegex = /\W/g; // 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/112.0.0.0 Safari/537.36

Challenge: Regular Expressions - Match Everything But Letters and Numbers

Link to the challenge:

Hi

You need to use “\w” which is for alpha numeric findings and not “\W” which is opposite

On the contrary “\W” work not “\w”.

Regard

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.