How to get the value of a number embedded in text using jQuery
I开发者_如何学JAVA need to find out the value of the numeric part from a string, where the string contains two parts, text and number. There is only one couple of such text. For example number01, data34 etc.
jQuery not needed:
var myString = 'data34';
var myNumber = myString.match(/\d+/);
alert(myNumber);
精彩评论