Foxtable(狐表)用户栏目专家坐堂 → 删除指定字符间的字符


  共有2079人关注过本帖树形打印复制链接

主题:删除指定字符间的字符

帅哥哟,离线,有人找我吗?
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:110744 积分:563646 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2017/6/23 15:01:00 [显示全部帖子]

Dim pattern As String = "\""item-item-\d+\"":"
Dim txt = "{""item-item-1494251246528"":{""title"":""部门"",""type"":""text"",""configvalue"":"""",""validate"":""true"",""un_print"":"""",""value"":""财务部""},""item-item-1494251261857"":{""title"":""设备名称"",""type"":""select"",""configvalue"":""电脑,打印机,复印机,传真机"",""validate"":""true"",""un_print"":"""",""value"":""打印机""},""item-item-1494251274018"":{""title"":""故障描述"",""type"":""textarea"",""configvalue"":"""",""validate"":""true"",""un_print"":"""",""value"":""卡纸""},""item-item-1494251296865"":{""title"":""附件"",""type"":""file"",""configvalue"":"""",""validate"":"""",""un_print"":"""",""value"":""""}}"
Dim rgx = new System.Text.RegularExpressions.Regex(pattern, System.Text.RegularExpressions.RegexOptions.IgnoreCase)

Output.Show(rgx.replace(txt,""))

话说回来。这种直接使用json解析即可,搞那么复杂干嘛

 回到顶部