JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://getfirebug.com/firebug-lite-debug.js"></script>
<p>Regular Expression comes from twemoji.js: <a href="https://github.com/twitter/twemoji">Github twemoji</a></p>

<p>Test runs on two strings, 10000 iterations. First string is all 1's, second string has one of them replaced with a "smart quote": U+201C</p>

JavaScript

re =...