PDA

View Full Version : stripping out certain characters


rowantrimmer
12-21-2002, 07:07 PM
Hello,

I have a variable called priceband that is completed in form.

What I need to do is look at the content of the variable and strip out any character that is not 0 - 9

Is there a javascript function to do this or a script that you may know of.

Merry Xmas

whammy
12-21-2002, 07:11 PM
priceband = priceband.replace(/\D/g,'');

:D