2018-10-08 17:34:43 +00:00
---
id: 587d7db8367417b2b2512ba1
title: Match All Non-Numbers
challengeType: 1
2018-10-10 20:20:40 +00:00
videoUrl: ''
localeTitle: Coincidir con todos los no números
2018-10-08 17:34:43 +00:00
---
## Description
2018-10-10 20:20:40 +00:00
< section id = "description" > El último desafío mostró cómo buscar dígitos usando el método abreviado < code > \d</ code > con una minúscula < code > d</ code > . También puede buscar no dígitos usando un atajo similar que use una < code > D</ code > mayúscula en su lugar. El atajo para buscar caracteres sin dígitos es < code > \D</ code > Esto es igual a la clase de caracteres < code > [^0-9]</ code > , que busca un solo carácter que no sea un número entre cero y nueve. </ section >
2018-10-08 17:34:43 +00:00
## Instructions
2018-10-10 20:20:40 +00:00
< section id = "instructions" > Use la clase de caracteres abreviados para no dígitos < code > \D</ code > para contar cuántos no dígitos hay en los títulos de las películas. </ section >
2018-10-08 17:34:43 +00:00
## Tests
< section id = 'tests' >
```yml
tests:
- text: Su expresión regular debe usar el carácter de acceso directo para hacer coincidir los caracteres que no son dígitos
testString: 'assert(/\\D/.test(noNumRegex.source), "Your regex should use the shortcut character to match non-digit characters");'
- text: Su expresión regular debe utilizar la bandera global.
testString: 'assert(noNumRegex.global, "Your regex should use the global flag.");'
2018-10-10 20:20:40 +00:00
- text: Su expresión regular no debe encontrar caracteres que no sean dígitos en < code > " 9" </ code > .
2018-10-08 17:34:43 +00:00
testString: 'assert("9".match(noNumRegex) == null, "Your regex should find no non-digits in < code > "9"< / code > .");'
2018-10-10 20:20:40 +00:00
- text: Su expresión regular debe encontrar 6 no dígitos en < code > " Catch 22" </ code > .
2018-10-08 17:34:43 +00:00
testString: 'assert("Catch 22".match(noNumRegex).length == 6, "Your regex should find 6 non-digits in < code > "Catch 22"< / code > .");'
2018-10-10 20:20:40 +00:00
- text: Su expresión regular debe encontrar 11 no dígitos en < code > " 101 Dalmatians" </ code > .
2018-10-08 17:34:43 +00:00
testString: 'assert("101 Dalmatians".match(noNumRegex).length == 11, "Your regex should find 11 non-digits in < code > "101 Dalmatians"< / code > .");'
2018-10-10 20:20:40 +00:00
- text: 'Su expresión regular debe encontrar 15 no dígitos en < code > " One, Two, Three" </ code > .'
2018-10-08 17:34:43 +00:00
testString: 'assert("One, Two, Three".match(noNumRegex).length == 15, "Your regex should find 15 non-digits in < code > "One, Two, Three"< / code > .");'
2018-10-10 20:20:40 +00:00
- text: Su expresión regular debe encontrar 12 no dígitos en < code > " 21 Jump Street" </ code > .
2018-10-08 17:34:43 +00:00
testString: 'assert("21 Jump Street".match(noNumRegex).length == 12, "Your regex should find 12 non-digits in < code > "21 Jump Street"< / code > .");'
2018-10-10 20:20:40 +00:00
- text: 'Su expresión regular debe encontrar 17 dígitos no en < code > " 2001: A Space Odyssey" </ code > .'
2018-10-08 17:34:43 +00:00
testString: 'assert("2001: A Space Odyssey".match(noNumRegex).length == 17, "Your regex should find 17 non-digits in < code > "2001: A Space Odyssey"< / code > .");'
```
< / section >
## Challenge Seed
< section id = 'challengeSeed' >
< div id = 'js-seed' >
```js
let numString = "Your sandwich will be $5.00";
let noNumRegex = /change/; // Change this line
let result = numString.match(noNumRegex).length;
2018-10-10 20:20:40 +00:00
2018-10-08 17:34:43 +00:00
```
< / div >
< / section >
## Solution
< section id = 'solution' >
```js
// solution required
```
< / section >