1
上面有一个字符串值。我包含了alphbets,特殊字符和数字以及whitspace的组合。但我想只检索数字。分割字符串中的特殊字符和字母
my code
-------
Dim str1 As String = "[email protected][email protected]#[email protected]#$#123456habAB^*^&(*)(_)()*("
Dim str2 As String = Regex.Replace(str1, "[\[\]\\\^\$\.\|\?\*\+\(\)\{\}%,;><[email protected]#&\-\+/d]", "")
MsgBox(str2)
output am getting
-----------------
123456habAB_
expected output
---------------
123456
非常感谢你的回复 – vps
欢迎光临。如果有帮助,请将其标记为已回答。 – Harsh
对不起,我忘了标记 – vps