Index: ActiviteitenOpvolging/ActiviteitenOpvolging/configs/ConfigsTextmapper.vb =================================================================== diff -u -r1677 -r1683 --- ActiviteitenOpvolging/ActiviteitenOpvolging/configs/ConfigsTextmapper.vb (.../ConfigsTextmapper.vb) (revision 1677) +++ ActiviteitenOpvolging/ActiviteitenOpvolging/configs/ConfigsTextmapper.vb (.../ConfigsTextmapper.vb) (revision 1683) @@ -69,17 +69,17 @@ End If 'Invoke the Match method, all text between and including the 'µ'. - Dim m As Match = Regex.Match(allText, "__[\S\s]*?__") + Dim matchCollection = Regex.Matches(allText, "__[\S\s]*?__") - If (m.Success) Then + If (matchCollection IsNot Nothing AndAlso matchCollection.Count > 0) Then 'If successful, overwrite each multiline from the groups as one line, without the seperator symbols 'µ'. - For Each group In m.Groups + For Each match In matchCollection 'Remove newLines, replace by space. - Dim onelineString = group.Value.Replace(vbCr, " ").Replace(vbLf, " ") + Dim onelineString = match.Value.Replace(vbCr, " ").Replace(vbLf, " ") 'Remove special characters. onelineString = onelineString.Replace("__", String.Empty) 'Overwrite multiline entry in text. - allText = allText.Replace(m.Value, onelineString) + allText = allText.Replace(match.Value, onelineString) Next End If