HOME       >>       Programming

[.net]matchall Function


CheckProgs

Public Function MatchAll(ByVal strSource As String, ByVal strStart As String, ByVal strEnd As String) As String() Dim strSearch As String Dim ctlRegEx As MatchCollection strSearch = Regex.Escape(strStart) & "(?<text>(\r\n)?.*?(\r\n)?)" & Regex.Escape(strEnd) If Regex.IsMatch(strSource, strSearch, RegexOptions.IgnoreCase) Then ctlRegEx = Regex.Matches(strSource, strSearch, RegexOptions.IgnoreCase) Else Return Nothing End If Dim strResult(ctlRegEx.Count - 1) As String Dim i As Long For i = 0 To ctlRegEx.Count - 1 strResult(i) = ctlRegEx.Item(i).Groups("text").Captures(0).ToString Next Return strResult End Function


VIEW DESKTOP VERSION REGISTERGET FREE HOSTING

Xisto.com offers Free Web Hosting to its Members for their participation in this Community. We moderate all content posted here but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2001-2019 by Xisto Corporation. All Rights Reserved.