我的办法笨一点,你可以参考,希望专家还有更好的办法:
Dim s As String ="删除中文abc123efg"
dim lst as new list (Of string)
for i as integer = 0 to s.length - 1
lst.add(s.substring(i,1)
next
for i as integer = 0 to lst.count - 1
if char.isdigit(lst(i)) then
s = s & lst(i)
end if
s = s.trim()Output.Show(s)