JSFiddle - React, Tailwind, and code Playground

by scurrilus

JavaScript

const test = "abaaadfegehrrh";
console.log(test.match(new RegExp("f","g")).length)