Files
2018-10-16 21:32:40 +05:30

389 B

title
title
Match All Numbers

Match All Numbers

Hint 1

  • A global flag will help you get through this challenge.

Hint 2

  • Try using a shorthand character for digits.

Spoiler Alert!! Solution Ahead!

Solution

let numRegex = /\d/g;

Explanation

  • The \d shorthand character is a shortcut for [0-9], it search for any number between 0 and 9.