--- id: 587d7db5367417b2b2512b96 title: Match Letters of the Alphabet challengeType: 1 videoUrl: '' localeTitle: Combina las letras del alfabeto --- ## Description
Vio cómo puede usar los character sets para especificar un grupo de caracteres para hacer coincidir, pero eso es mucho para escribir cuando necesita hacer coincidir una gran variedad de caracteres (por ejemplo, todas las letras del alfabeto). Afortunadamente, hay una característica incorporada que hace que esto sea breve y simple. Dentro de un character set , puede definir un rango de caracteres para hacer coincidir usando un carácter de hyphen : - . Por ejemplo, para que coincida con las letras minúsculas a medio e que usaría [ae] .
vamos catStr = "gato";
dejar batStr = "bat";
dejar matStr = "mat";
vamos bgRegex = / [ae] en /;
catStr.match (bgRegex); // Devoluciones ["cat"]
batStr.match (bgRegex); // Devoluciones ["bat"]
matStr.match (bgRegex); // Devoluciones nulas
## Instructions
Coinciden con todas las letras en la cadena quoteSample . Nota
Asegúrese de hacer coincidir las letras mayúsculas y minúsculas .
## Tests
```yml tests: - text: Su regex alphabetRegex debe coincidir con 35 elementos. testString: 'assert(result.length == 35, "Your regex alphabetRegex should match 35 items.");' - text: Su regex alphabetRegex debe usar la bandera global. testString: 'assert(alphabetRegex.flags.match(/g/).length == 1, "Your regex alphabetRegex should use the global flag.");' - text: Su regex alphabetRegex debe usar la bandera que no distingue entre mayúsculas y 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 ```