docs(letter-space-number): Add examples

This commit is contained in:
nprimo 2022-09-01 11:48:26 +01:00 committed by Niccolò Primo
parent daa52c1fd8
commit b624bf8290
1 changed files with 7 additions and 0 deletions

View File

@ -4,6 +4,13 @@
Create a function named `letterSpaceNumber` that accepts a string; returning an array with every instance of a letter, followed by a space, followed by a number, only if that number has only one digit, and is not followed by any letter.
### Examples
```js
console.log(letterSpaceNumber('example 1, example 20'))
// output: ['e 1']
```
### Notions
- [RegEx Shorthand Character Sets](https://github.com/ziishaned/learn-regex#3-shorthand-character-sets)