Regex, why is the regex wrong?

I’m no sure why is it wrong, I’m trying to match the word coding and I looked the hint and just change the order, am I missing anything else?

Your code so far


let extractStr = "Extract the word 'coding' from this string.";
let codingRegex = extractStr.match(/coding/); // Change this line
let result = codingRegex; // Change this line

Hello and welcome to the forum :grin:!

The problem you have is that the challenge requires you to keep the original format, that is, codingRegex should be just the regular expression and result contain the match.

well, codingRegex should just be the regex, and result should be the value returned from match

Thank you!! @skaparate and @ilenia

1 Like