Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

multichar-regex

michaelrhodes39kMIT2.0.0

a regular expression that matches all the surrogate pairs and combining-marked characters in a string

regex, emoji, surrogate, combining, mark

readme

multichar-regex

This is a regular expression that matches all the surrogate pairs and combining-marked characters in a string.

Build status

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': '☀️' }

License

MIT