tags:

views:

13

answers:

1

I 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.

+2  A: 

jQuery not needed:

var myString = 'data34';
var myNumber = myString.match(/\d+/);
alert(myNumber);
Fosco
Thanks a lot! I have juust started jQuery and its really fun.
Kangkan