'ocrText = Metadata.Values("OCR_ZONE01")

ocrText = "bslbdsfsgfdhfgh sdhsghfdg hsfgfsdgh ssdhsdfghfghfghsdh ABN: 41 824 753 556 sdhgdfghdfghdfghdfghfdshg sghdgh"
Dim Target, Target2
Target = ".*(ABN: |ABN:|Tax Number: |A.B.N. |A.B.N.|ABN |ABN|abn:|abn: |A.B.N |)\$*(([0-9]{2} [0-9]{3} [0-9]{3} [0-9]{3})|([0-9]{11}))"

Dim arrLines
arrLines = Split(ocrText, "\r\n")

call Metadata.SetValues("MY_FILENAME", "## NOT FOUND ##")

Dim matchedValue

For Each strline in arrLines
    match = GetFirstMatch(target, strline)
    If match <> "" Then
		found_abn = match		
        'not usefull for your case call Metadata.SetValues("MY_SUPPLIER_ABN", match)
    End If
Next

Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("C:\ProgramData\Scanshare\Test.txt")

Do Until f.AtEndOfStream
  LineTxt = f.ReadLine
  search="="
  Business=left (LineTxt, instr(LineTxt, search)-1)
  Vendor=right (LineTxt, len(LineTxt)-instrrev (LineTxt, search))
  if  Business = found_abn then    
	call Metadata.SetValues("MY_FILENAME", Vendor)
  end if
Loop

f.Close

Function GetFirstMatch(PatternToMatch, StringToSearch)
    Dim objRE , CurrentMatch, objMatch

    Set objRE  = New RegExp
    objRE.Pattern = PatternToMatch
    objRE.IgnoreCase = True
    objRE.Global = False

    Set objMatch = objRE.Execute(StringToSearch)
   
    GetFirstMatch = ""
    If objMatch.Count = 1 Then

        GetFirstMatch = objMatch.Item(0).Submatches(1)
    End If
       
    Set objRE  = Nothing
End Function