multichar-regex
v2.0.0
Published
a regular expression that matches all the surrogate pairs and combining-marked characters in a string
Downloads
51,845
Maintainers
Readme
multichar-regex
This is a regular expression that matches all the surrogate pairs and combining-marked characters in a string.
Install
$ npm install multichar-regex
Usage
// If you want to use the raw regular expression, you can…
var regex = require('multichar-regex')
// …but this helper function might be nicer to use.
var matches = require('multichar-regex/matches')
matches('oh hi, doggy 🐶 meet the sun: ☀️')
// index: value
=> { '13': '🐶', '30': '☀️' }