24-06-17, 06:46 PM
اقصد [][/]
كود بسيط جدا
الكود التالي رخيص من انشائي
كود بسيط جدا
كود :
Private Function removebbcodetag(ByVal content As String) As String
Return System.Text.RegularExpressions.Regex.Replace(content, "\[[^]]+\]", "")
End Function
الكود التالي رخيص من انشائي
كود :
Private Function rep(ByVal txt As String) As String
Dim str1 As String = "(\[.*?\])(.*?)(\[\/.*?\])"
Dim reg As New Regex(str1, RegexOptions.IgnoreCase)
For Each ma As Match In reg.Matches(txt)
txt = txt.Replace(ma.Groups(1).Value, "")
txt = txt.Replace(ma.Groups(3).Value, "")
Next
Return txt
End Function