tags:

views:

54

answers:

3

Possible Duplicate:
Regex using javascript to return just numbers.

How do I get the humber from a string like this?

blabla-33434
A: 

Use split()

result = str.split('-')
document.write(result[1]);
DRL
A: 

you can use a regular expression:

var m = 'blabla-33434'.match(/\d+/g);

then

m contains ['33434']

Another link specific to Javascript Regular Expressions

fuzzy lollipop
A: 
str="blabla-33434";
var mytool_array=str.split("-");
document.write(mytool_array[1]);
Richa