JSFiddle - React, Tailwind, and code Playground

HTML

<span>This cost $15.99 per item</span>

JavaScript

alert($('span').text().match(/\$\d+.\d+/));