Skip to content

Richienb/char-regex

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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