MS 19.08
This commit is contained in:
@@ -7,32 +7,32 @@ Public Class ClassPostprocessing
|
||||
For Each row As DataRow In DTNB.Rows
|
||||
Select Case row.Item("TYPE").ToString.ToUpper
|
||||
Case "VBSPLIT"
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" ... Nachbearbeitung mit VBSPLIT", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" ...Nachbearbeitung mit VBSPLIT", False)
|
||||
Dim strSplit() As String
|
||||
strSplit = result.Split(row.Item("TEXT1"))
|
||||
For i As Integer = 0 To strSplit.Length - 1
|
||||
If i = CInt(row.Item("TEXT2")) Then
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" ... Split-Ergebnis für Index (" & i.ToString & "): " & strSplit(i), False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" ...Split-Ergebnis für Index (" & i.ToString & "): " & strSplit(i), False)
|
||||
result = strSplit(i).ToString
|
||||
End If
|
||||
Next
|
||||
Case "VBREPLACE"
|
||||
If LogErrorsOnly = False Then
|
||||
ClassLogger.Add(" ... Nachbearbeitung mit VBREPLACE", False)
|
||||
ClassLogger.Add(" ... Ersetze '" & row.Item("TEXT1") & "' mit '" & row.Item("TEXT2") & "'", False)
|
||||
ClassLogger.Add(" ...Nachbearbeitung mit VBREPLACE", False)
|
||||
ClassLogger.Add(" ...Ersetze '" & row.Item("TEXT1") & "' mit '" & row.Item("TEXT2") & "'", False)
|
||||
result = result.Replace(row.Item("TEXT1"), row.Item("TEXT2"))
|
||||
End If
|
||||
|
||||
result = result.Replace(row.Item("TEXT1"), row.Item("TEXT2"))
|
||||
Case "Regular Expression"
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" ... NAchbearbeitung mit RegEx", False)
|
||||
Case "REG. EXPRESSION"
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" ...Nachbearbeitung mit RegEx", False)
|
||||
Dim RegexList As New List(Of System.Text.RegularExpressions.Regex)
|
||||
Dim Regex As New System.Text.RegularExpressions.Regex(row.Item("TEXT1"), System.Text.RegularExpressions.RegexOptions.IgnoreCase)
|
||||
RegexList.Add(Regex)
|
||||
'
|
||||
Dim resultRegex = ClassPostprocessing.extractFromStringviaRE(result, RegexList)
|
||||
If Not IsNothing(resultRegex) Then
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" ... Ergebnis des RegEx: " & resultRegex.ToString, False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" ...Ergebnis des RegEx: " & resultRegex.ToString, False)
|
||||
result = resultRegex.ToString
|
||||
Else
|
||||
ClassLogger.Add("Postprocessing RegEx konnte kein ergebnis auswerten!", True)
|
||||
|
||||
Reference in New Issue
Block a user