Jquery uses attr to get the src, of the picture and ask how to extract the numbers inside.

how do I extract 19

from it?
Mar.20,2021

var str ='.. / imgs/ico19.png';
str.match (/ hr class= /) [0];


Don't think too much, it's just a string, ok, ico and.


you can find a point after getting the string, then find a non-numeric character from the point forward, and finally intercept the string in between.

Menu