Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
August 20, 2006
A. The following script, which you can download at http://www.windowsitpro.com/articles/download/extractnum.zip , takes a passed string and outputs only the numeric characters:
Option ExplicitDim strOriginal, intLength, intCount, strFinal' Check all arguments required have been passedIf Wscript.Arguments.Count
The following sample execution
D:temp>cscript extractnumeric.vbs 1234sd242ds--34..df
Would produce this result:
123424234
You May Also Like