I know that I have to to put the digit flag and the global flag as I’ve done, but what should I put in the slashes (//). Task: (Use the shorthand character class
\d to count how many digits are in movie titles.) Please help me.
EDIT: I see my mistake, I’ve got it now.
let movieName = "2001: A Space Odyssey"; let numRegex = //dg; // Change this line let result = movieName.match(numRegex).length;
Challenge: Regular Expressions - Match All Numbers
Link to the challenge: