JSFiddle - React, Tailwind, and code Playground

JavaScript

var s = "Some_text_123_text";
index = s.match(/\d+/);
document.writeln(index);