Dim mchMatches As System.Text.RegularExpressions.MatchCollection
Dim strNonMatches() As String
Dim mchTemp As System.Text.RegularExpressions.Match
Dim strTemp As String
Dim strFinalString As String
Dim i As Integer = 0
mchMatches = regex.Matches(strHtml)
strNonMatches = regex.Split(strHtml)
For Each strTemp In strNonMatches
MessageBox.Show("Split: " & strTemp)
Next
For i = 0 To mchMatches.Count - 1
mchTemp = mchMatches(i)
strFinalString += strNonMatches(i) & " [changed]"
strFinalString += mchTemp.ToString()
MessageBox.Show("Match: " & mchTemp.ToString())
If i = mchMatches.Count - 1 Then
strFinalString += strNonMatches(i + 1) & " [changed]"
End If
Next
While i < strNonMatches.Length - 1
strFinalString += strNonMatches(i) & " [changed]"
i += 1
End While
MessageBox.Show(strFinalString)
HTH,
Brandon
Stevo said:
I need to modify the string data as a whole, not just retrieve the fields.
Using split makes it easy to get all the data outside the bounds of the
tags, but then how would I modify that data and place it back into the
initial string?
bounds