【发布时间】:2012-09-13 09:02:03
【问题描述】:
我有一个字符串值。我包含字母、特殊字符和数字以及空白的组合。但我只想检索数字。
my code
-------
Dim str1 As String = "!@!@#!$@#$#123456habAB^*^&(*)(_)()*("
Dim str2 As String = Regex.Replace(str1, "[\[\]\\\^\$\.\|\?\*\+\(\)\{\}%,;><!@#&\-\+/d]", "")
MsgBox(str2)
output am getting
-----------------
123456habAB_
expected output
---------------
123456
【问题讨论】: