JSFiddle - React, Tailwind, and code Playground

JavaScript

var str = "This is the best moth";
alert(str.match(/\bth/gi));