Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Shared Function regexs(ByVal pattern As String, ByVal data As String, ByVal replace As String)
- Dim Rgx As New Regex(pattern)
- Dim MatchR As Match = Rgx.Match(data)
- Dim res As String = ""
- While MatchR.Success
- Dim m As String = MatchR.ToString
- If replace <> "" Then
- m = m.Replace(replace, "")
- End If
- If res = "" Then
- res = m
- Else
- res = res & m
- End If
- MatchR = MatchR.NextMatch()
- End While
- Return res
- End Function
- ' الاستخدام :
- ' regexs("كود الريجكس", Data , "اذا تبغا تسوي ريبليس .. حط الكلام هنا")
Advertisement
Add Comment
Please, Sign In to add comment