Is there a way to count characters using regular expressions

Maybe I am missing something but this particular test requires one to use the short hand charcter class \w to match all alphanumerics in the quote and thereafter count them.

Trouble is the expected answers want the sum total of all characters in the string my solution is rejected and the provided solution in the help section is wrong because the match() string method will break the string into words and return the array therefore

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

will return an array of length 6
This is the solution provide which I have tested and still returns a wrong value

let quoteSample = "The five boxing wizards jump quickly.";
let alphabetRegexV2 = /\w+/gi; // Change this line
let result = quoteSample.match(alphabetRegexV2).length;

This is my proposed

let quoteSample = "The five boxing wizards jump quickly.";
let alphabetRegexV2 = /\w+/gi; // Change this line
let result = quoteSample.match(alphabetRegexV2).length;
let alphaCount=(array)=>{
     let total=0;
     for(let i=0;i<array.length;i++){
          total+=array[i].length;
      }
     return total;
}

alphaCount(result);

Which counts the individual charcters in the string. Now maybe there is a way to achieve this by the employ of regular expressions only so if you have any ideas please help. Thank you

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

If you are trying to count the number of characters, then you do not want the +. This is what causes your match to create arrays of words instead of letters. Remember that \w+ means “one or more word-characters”. The match will therefore be a group of sequential alphanumerics. In other words, words.

Would you look at that. haha Thanks a bunch

Glad I could help. Happy coding!