I would try Regex. You can look for \d and pull all instances, then concat
back the resulting array. There are a couple of other ways to work with
this.
Note that VB.NET still has IsNumber() or IsNumeric() [forget which one], so
you can still loop and test, if you want to go with VB.NET.
Another option is convert to a char array and test the numeric value of each
char. The ASCII value for numbers is extremely predictable.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
************************************************
Think Outside the Box!
************************************************
"MattB" <so********@yahoo.com> wrote in message
news:2h************@uni-berlin.de...
Is there simple way to take a string that should be all numeric (like a
credit card number) and strip out anything that isn't a digit? In the past
I've done this in VFP using the IsDigit() function, looping through each
character. It was a little awkward, but worked. Is there something
similar, or better for vb.net?
Thanks!
Matt