JS - Method to Extract numbers from given string
by barkkathulla[ Edit ] 2014-03-01 14:57:52
Easy way to get numbers from given string variable:
var matches = yourstringvariable.match(/(d+)sl(d+)/);
var number1 = Number(matches[1]);
var number2 = Number(matches[2]);
(or)
(your_js_variable.match(/d+$/)[0]);