Tell us what’s happening:
I tried \W
but it didn’t work.
I don’t want to pass the test with Hello, World!
I need to do the “appropriate string methods” (pass the test with special characters).
Your code so far
let hello = " Hello, World! ";
let wsRegex = /\b\w{5}\W+\s\D+\b/; // Change this line
let result = hello.match(wsRegex); // Change this line
console.log(result);
Your browser information:
User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0
.
Challenge: Remove Whitespace from Start and End
Link to the challenge: