Match Everything But Letters and Numbers2

Tell us what’s happening:

This is the error message

// running test
Your regex should use the global flag.
Your regex should find 6 non-alphanumeric characters in “The five boxing wizards jump quickly.”.
Your regex should find 8 non-alphanumeric characters in “Pack my box with five dozen liquor jugs.”
Your regex should find 6 non-alphanumeric characters in “How vexingly quick daft zebras jump!”
Your regex should find 12 non-alphanumeric characters in “123 456 7890 ABC def GHI jkl MNO pqr STU vwx YZ.”
// tests completed

Your code so far

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

Link to the challenge:

But there is any global flag with your pattern. Add a g at the end of pattern should pass the challenge.

Look at the message on the right you are getting: “Your regex should use the global flag.”

If you are not sure what the global flag is, try looking it up in a previous lesson or a web search.