以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=126649)

--  作者:lzj
--  发布时间:2018/10/25 19:50:00
--  [求助]
请问大师关于字符串的一个问题:

我要排除字符串“0123456789”中的“2”,“3”,“6”,“7”,“8”,请问最简洁的代码该怎么写!!!

--  作者:有点蓝
--  发布时间:2018/10/26 8:54:00
--  
Dim str As String = "0123456789"
For Each s As String In "2,3,6,7,8".Split(",")
    str = str.Replace(s,"")
Next
msgbox(str)

--  作者:lzj
--  发布时间:2018/10/26 11:40:00
--  
谢谢大师了