Files

32 lines
466 B
Markdown
Raw Normal View History

2018-10-12 15:37:13 -04:00
---
title: Match All Non-Numbers
---
# Match All Non-Numbers
2018-10-12 15:37:13 -04:00
---
## Hints
### Hint 1
2018-10-12 15:37:13 -04:00
* You should try using a global flag.
### Hint 2
2018-10-12 15:37:13 -04:00
* Try a shorthand character for non-digits characters.
---
## Solutions
<details><summary>Solution 1 (Click to Show/Hide)</summary>
2018-10-12 15:37:13 -04:00
```javascript
let noNumRegex = /\D/g;
```
#### Code Explanation
2018-10-12 15:37:13 -04:00
* The `\D` shorthand character is used to match non-digits characters, it has the same result as using `[^0-9]`;
</details>