https://github.com/richienb/char-regex
A regex to match any full character, considering weird character ranges.
https://github.com/richienb/char-regex
Last synced: 9 months ago
JSON representation
A regex to match any full character, considering weird character ranges.
- Host: GitHub
- URL: https://github.com/richienb/char-regex
- Owner: Richienb
- License: mit
- Created: 2020-01-31T10:31:25.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-11-20T14:25:28.000Z (about 1 year ago)
- Last Synced: 2025-04-11T09:32:35.250Z (9 months ago)
- Language: JavaScript
- Size: 212 KB
- Stars: 27
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# char-regex
A regex to match any full character, considering weird character ranges. Tested on every single emoji and unicode character. Based on the Lodash implementation.
## Install
```sh
npm install char-regex
```
## Usage
```js
import charRegex from 'char-regex';
'❤️👊🏽'.match(/./);
//=> ['', '', '', '', '', '', '']
'❤️👊🏽'.match(charRegex());
//=> ['❤️', '👊🏽']
```
## Related
- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string