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 Explicit Dim strOriginal, intLength, intCount, strFinal ' Check all arguments required have been passed If Wscript.Arguments.CountThe following sample execution
D:\temp>cscript extractnumeric.vbs 1234sd242ds--34..df
Would produce this result:
123424234
0 comments
Hide comments