Update snippet descriptions
This commit is contained in:
@@ -5,7 +5,7 @@ tags: string,regexp,intermediate
|
||||
|
||||
Removes non-printable ASCII characters.
|
||||
|
||||
- Use a regular expression to remove non-printable ASCII characters.
|
||||
- Use `String.prototype.replace()` with a regular expression to remove non-printable ASCII characters.
|
||||
|
||||
```js
|
||||
const removeNonASCII = str => str.replace(/[^\x20-\x7E]/g, '');
|
||||
|
||||
Reference in New Issue
Block a user