出50个大洋请人帮我写一段正则表达式,主要用来替换一些代码。

 我来答
嗬哟嗬哟拔萝卜
2015-07-10 · 超过74用户采纳过TA的回答
知道小有建树答主
回答量:164
采纳率:100%
帮助的人:99万
展开全部
网页的 比如
For j1 = 1 To ssq_xx.Length
Select Case j1
Case 1
Dim t1 As String = Regex.Replace(dlt_xx(1), " class=[^>]+>", "")
Dim t2 As String = Regex.Replace(t1, "<a[^>]+>", "")
cp_type = Regex.Replace(t1, "<[^>]+>", "") + vbNewLine
Case 2
Dim t1 As String = Regex.Replace(dlt_xx(2), " class=[^>]+>", "")
Dim t2 As String = Regex.Replace(t1, "<a[^>]+>", "")
cp_stage = Regex.Replace(t1, "<[^>]+>", "") + vbNewLine
Case 3
cp_time = Replace(Replace(dlt_xx(3), "</td>", ""), ">", "") & vbNewLine
Case 4
Dim t1 As String = Mid(Replace(dlt_xx(4), vbTab, ""), 2, Replace(dlt_xx(4), vbTab, "").Length)
Dim t2 As String = Regex.Replace(t1, "<a[^>]+>.*</a></td>", "")
Dim t3() As String = Split(t2, "<em ")
Dim t4 As String = ""
For k = 0 To 7
t4 += Regex.Replace(t3(k), "c[^>]+>", "") & " "
t4 = Replace(t4, vbCrLf, "")
t4 = Replace(t4, "</em>", "")
Next
t4 = Mid(t4, 1, 16) & "| " & Mid(t4, 17, 5)
cp_content = t4
End Select
Next
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式