Skip to content

A regex to match any full character, considering weird character ranges.

License

Notifications You must be signed in to change notification settings

Richienb/char-regex

Repository files navigation

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

npm install char-regex

Usage

import charRegex from 'char-regex';

'β€οΈπŸ‘ŠπŸ½'.match(/./);
//=> ['', '', '', '', '', '', '']

'β€οΈπŸ‘ŠπŸ½'.match(charRegex());
//=> ['❀️', 'πŸ‘ŠπŸ½']

Related