Hi,

I have the following snippet of code that creates my arrays from a concatenated string. This was adapted from #snb (thanks ).

I would like to be able to loop through the arrays and search and replace part of the string to pick up times e.g. 09.30am (regular expression here) and replace with hh:mm.

I've copied in a snippet of the code for now which currently loops through the arrays finding small discrepancies but I'm picking up a lot of false positives like times that I want to remove initially.


'Breaking file strings into arrays
TArray = Split(TargetFile, vbCrLf)
CArray = Split(ComparisonFile, vbCrLf)

If UBound(TArray) <> UBound(CArray) Then
result = result & vbCr & Target.Name & "|File Missing Data"
Else

**
In here is where I would expect the search and replace to happen before the code begins pulling out the discrepancies.
**

'Testing when array sizes match, but small discrepencies
For j = 0 To UBound(TArray)
If StrComp(TArray(j), CArray(j)) <> 0 Then
c05 = " " & vbTab & "Line " & j & ": " & TArray(j)
Filename = Target.Name
'Call output generation
Call MisMatchFileReport(Target, c05, Output, Filename)
End If
Next
End If

Thanks in advance.