txt = '<a class="info" href="/some/link" original-title="hello world <br/> Monday <br/> 2 days <br/> Test"> 10 </a>';
var pattern = /\s\d+/;
var parsed_data = parseInt((txt.match(pattern)||['0'])[0]);
Got this regex pattern from some example. I am trying to parse the text i.e. value 10 from the anchor tag. But the value obtained is 2.
EDIT: I am using datatables to populate the tables. And problem is the string i.e. txt is a row element, extracted from table using loop and need to add these values e.g.
var parsed_data += parseInt((txt.match(pattern)||['0'])[0]);