以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  请问在一段字符中删除【】及其中的任意字符用什么代码,如【1.顶替地震天】  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=72580)

--  作者:sxdoc
--  发布时间:2015/8/1 22:54:00
--  请问在一段字符中删除【】及其中的任意字符用什么代码,如【1.顶替地震天】
请问在一段字符中删除【】及其中的任意字符用什么代码,如【1.顶替地震天】

--  作者:飞飞
--  发布时间:2015/8/1 23:29:00
--  
用 ascII?
--  作者:大红袍
--  发布时间:2015/8/2 9:31:00
--  

参考代码

 


Dim str As String = "1234【1.顶替地震天】56789【1.顶替地震天】 "
Dim reg As New System.Text.RegularExpressions.Regex("【+.*?】+")
str = reg.Replace(str, "")
msgbox(str)

 


--  作者:sxdoc
--  发布时间:2015/8/2 14:13:00
--  
谢谢大红袍