JSFiddle - React, Tailwind, and code Playground

HTML

<div id="block-id-45"></div>

JavaScript

$(function() {
    alert($("div").attr("id").match(/[\d]+$/));
});