I have a string in a loop and for every loop, it is filled with texts the looks like this:
\"123 hello everybody 4\" \"4567 stuff is fun 67\" \"12368 more st
This replace method with a simple regular expression ([^\d].*):
replace
[^\d].*
'123 your 1st string'.replace( /[^\d].*/, '' ); // output: "123"
remove everything without the first digits.