--- id: 587d7db9367417b2b2512ba4 title: Match Non-Whitespace Characters challengeType: 1 videoUrl: '' localeTitle: Corresponder Personagens Não-Brancos --- ## Description
Você aprendeu sobre a pesquisa de espaço em branco usando \s , com um s minúsculo. Você também pode pesquisar tudo, exceto o espaço em branco. Procure por espaços não brancos usando \S , que é um s maiúsculo. Esse padrão não corresponderá a espaço em branco, retorno de carro, guia, feed de formulário e novos caracteres de linha. Você pode pensar que é semelhante à classe de caracteres [^ \r\t\f\n\v] .
let whiteSpace = "Espaço em branco. Espaço em branco em todo lugar!"
deixe nonSpaceRegex = / \ S / g;
whiteSpace.match (nonSpaceRegex) .length; // retorna 32
## Instructions
Altere o countNonWhiteSpace da regex para procurar vários caracteres que não sejam espaços em branco em uma string.
## Tests
```yml tests: - text: Seu regex deve usar o sinalizador global. testString: 'assert(countNonWhiteSpace.global, "Your regex should use the global flag.");' - text: Seu regex deve usar o caractere abreviado testString: 'assert(/\\S/.test(countNonWhiteSpace.source), "Your regex should use the shorthand character \S/code> to match all non-whitespace characters.");' - text: Seu regex deve encontrar 35 não-espaços em "Men are from Mars and women are from Venus." testString: 'assert("Men are from Mars and women are from Venus.".match(countNonWhiteSpace).length == 35, "Your regex should find 35 non-spaces in "Men are from Mars and women are from Venus."");' - text: 'Seu regex deve encontrar 23 espaços diferentes em "Space: the final frontier."' testString: 'assert("Space: the final frontier.".match(countNonWhiteSpace).length == 23, "Your regex should find 23 non-spaces in "Space: the final frontier."");' - text: Seu regex deve encontrar 21 não espaços em "MindYourPersonalSpace" testString: 'assert("MindYourPersonalSpace".match(countNonWhiteSpace).length == 21, "Your regex should find 21 non-spaces in "MindYourPersonalSpace"");' ```
## Challenge Seed
```js let sample = "Whitespace is important in separating words"; let countNonWhiteSpace = /change/; // Change this line let result = sample.match(countNonWhiteSpace); ```
## Solution
```js // solution required ```