var thisNum = data.match(/<\s*span[^>]*>(.*)<\s*[^>]*>/gi);
thisNum will be a comma-delimited array that returns the regex match of the whole string as the first part [0] and the backreference (between parenthesis) as the second part [1]. So, thisNum[1] should be the value "5".
UPDATE: If there are more than one instance of span tags within the string, there will be more than two items in the array… the second position through nth position of the array will be each instance of a value sandwiched between span tags.
Honestly, I’m not entirely sure, as I don’t use match() often.
But, according to the MDN page for match(), the g flag will return only the matched regex substring (ie, the whole match.) Whereas if you don’t use the g flag, the array will contain captures (aka ‘backreference’, the part within the parenthesis.)