I want to remove all non-numeric characters from a Social Security Number.
Input: 111-00-3333
Result from regExp replace should be: 111003333
The result I am actually getting (which is wrong) is: 11100-3333'
The reg expression that I am using is: \D
I am getting the wrong result from the following function.
Please let me know what I'm doing wrong if anyone can see:
Calling function here (using Classic ASP):
Function RegExpNumbersOnly(taxID)
Set re = New RegExp
With re
.Pattern = "\D"
.IgnoreCase = True
.Global = True
End With
RegExpNumbersOnly = re.Replace(taxID, "")
End Function