JSFiddle - React, Tailwind, and code Playground

by Richard Hunter

HTML

<div id="bar">
  <input id="foo" type="button" value="blah"/>
</div>

JavaScript

bar.addEventListener('click', (event) => {
  const myString = 'hhello world';
  const regex = /[h]{2,}ello/;
  console.log(regex.test(myString));
}, false);