--- id: 587d7db8367417b2b2512ba1 title: Match All Non-Numbers challengeType: 1 forumTopicId: 301347 localeTitle: Совпадение всех не-чисел --- ## Description
Последняя задача показала, как искать цифры с помощью ярлыка \d с нижним регистром d . Вы также можете искать нецифровые символы, используя аналогичный ярлык, который использует вместо этого верхний регистр D Ярлык поиска несимметричных символов - \D Это равно классу символов [^0-9] , который ищет один символ, который не является числом от нуля до девяти.
## Instructions
Используйте класс сокращенного символа для нецифровых цифр \D чтобы подсчитать, сколько цифр не указано в названиях фильмов.
## Tests
```yml tests: - text: Your regex should use the shortcut character to match non-digit characters testString: assert(/\\D/.test(noNumRegex.source)); - text: Your regex should use the global flag. testString: assert(noNumRegex.global); - text: Your regex should find no non-digits in "9". testString: assert("9".match(noNumRegex) == null); - text: Your regex should find 6 non-digits in "Catch 22". testString: assert("Catch 22".match(noNumRegex).length == 6); - text: Your regex should find 11 non-digits in "101 Dalmatians". testString: assert("101 Dalmatians".match(noNumRegex).length == 11); - text: Your regex should find 15 non-digits in "One, Two, Three". testString: assert("One, Two, Three".match(noNumRegex).length == 15); - text: Your regex should find 12 non-digits in "21 Jump Street". testString: assert("21 Jump Street".match(noNumRegex).length == 12); - text: 'Your regex should find 17 non-digits in "2001: A Space Odyssey".' testString: 'assert("2001: A Space Odyssey".match(noNumRegex).length == 17);' ```
## Challenge Seed
```js let movieName = "2001: A Space Odyssey"; let noNumRegex = /change/; // Change this line let result = movieName.match(noNumRegex).length; ```
## Solution
```js let movieName = "2001: A Space Odyssey"; let noNumRegex = /\D/g; // Change this line let result = movieName.match(noNumRegex).length; ```