--- id: 587d7db5367417b2b2512b96 title: Match Letters of the Alphabet challengeType: 1 videoUrl: '' localeTitle: Correspondência de letras do alfabeto --- ## Description
Você viu como é possível usar character sets para especificar um grupo de caracteres a serem correspondidos, mas isso é muita digitação quando você precisa corresponder a um grande intervalo de caracteres (por exemplo, todas as letras do alfabeto). Felizmente, há um recurso embutido que torna isso simples e curto. Dentro de um character set , você pode definir um intervalo de caracteres para corresponder usando um caractere de hyphen : - . Por exemplo, para corresponder letras minúsculas de a até e você usaria [ae] .
deixe catStr = "cat";
deixe batStr = "bat";
let matStr = "mat";
deixe bgRegex = / [ae] em /;
catStr.match (bgRegex); // Retorna ["gato"]
batStr.match (bgRegex); // Retorna ["bat"]
matStr.match (bgRegex); // Retorna nulo
## Instructions
Corresponder todas as letras da string quoteSample . Nota
Certifique-se de combinar as letras maiúsculas e minúsculas .
## Tests
```yml tests: - text: Seu regex alphabetRegex deve corresponder a 35 itens. testString: 'assert(result.length == 35, "Your regex alphabetRegex should match 35 items.");' - text: Seu regex alphabetRegex deve usar o sinalizador global. testString: 'assert(alphabetRegex.flags.match(/g/).length == 1, "Your regex alphabetRegex should use the global flag.");' - text: Seu regex alphabetRegex deve usar o sinalizador insensível a maiúsculas e minúsculas. testString: 'assert(alphabetRegex.flags.match(/i/).length == 1, "Your regex alphabetRegex should use the case insensitive flag.");' ```
## Challenge Seed
```js let quoteSample = "The quick brown fox jumps over the lazy dog."; let alphabetRegex = /change/; // Change this line let result = alphabetRegex; // Change this line ```
## Solution
```js // solution required ```