JSFiddle - React, Tailwind, and code Playground

JavaScript

alert(
    "167691#15316243".match(/\d{8}/g)[0]
);