Possible Duplicate:
Javascript: strip out non-numeric characters from string
String matching is headache for me.
Example:
If I have strings like these:
abc123xyz456()*
^%$111u222
Then convert it to:
123456
111222
How about regular expressions?
Try something something like:
'abc123xyz456()*'.replace(/\D/g,'')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With