然后返回1234567 谢谢
答案 0 :(得分:0)
除去0-9
,.
和,
之外的所有内容,因为它们是数字的有效部分。
这称为正则表达式。请参阅VBScript的帮助。
Set re = New RegExp
re.Pattern = "[^0-9\.,]"
re.Global = True
re.IgnoreCase = True
Sortkey = re.Replace(Sortkey, "")
答案 1 :(得分:-1)
Public Function ExtractNumber(Source as string) as string
dim result as string = string.empty
for each c as char in Source
if isnumeric(c) then result &= c
next
return result
end function