منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : كود تنظيف نص من وسوم bbcode
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
اقصد [][/]
كود بسيط جدا 
كود :
Private Function removebbcodetag(ByVal content As String) As String
       Return System.Text.RegularExpressions.Regex.Replace(content, "\[[^]]+\]", "")
   End Function

الكود التالي رخيصSmile من انشائي
كود :
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