andru26
3/30/2017 - 9:35 PM

Get number from string

Get number from string

 window.location.pathname.match(/\d+/); // array
 window.location.pathname.match(/\d+/)[0];