Files

32 lines
456 B
Markdown
Raw Normal View History

2018-10-12 15:37:13 -04:00
---
title: Match All Numbers
---
# Match All Numbers
2018-10-12 15:37:13 -04:00
---
## Hints
### Hint 1
2018-10-12 15:37:13 -04:00
* A global flag will help you get through this challenge.
### Hint 2
2018-10-12 15:37:13 -04:00
* Try using a shorthand character for `d`igits.
---
## Solutions
<details><summary>Solution 1 (Click to Show/Hide)</summary>
2018-10-12 15:37:13 -04:00
```javascript
let numRegex = /\d/g;
```
#### Code Explanation
2018-10-12 15:37:13 -04:00
* The `\d` shorthand character is a shortcut for `[0-9]`, it search for any number between 0 and 9.
</details>