I have a macro that runs through a text file checking for instances of a string, and then extracting some characters after the string is identified. A while back I was helped with coding the line below to do just that.
sn = Split(Replace(Join(Filter(Filter(Split(.Content, ")"), "GS1"), "( ", 0), "|"), " GS1    : (", "'"), "|")
that line of code helped me pull the "XXXXXXXXXXXXXXXXXXXXX" from the text file for every instance like the line of text below:
3) GS1 : (XXXXXXXXXXXXXXXXXXXXX)

now I have a different text file, with similar data, but with a different text structure that I need to pull the same string from.

the new line(s) of text I need to pull from are structured like the line below:
04:06:57.450| SendIOS |XXXXXXXXXXXXXXXXXXXXX| 00000| X134| | 077| | | 07| 1| 4| | Del_Day_Ind| 3

I need to modify the line of code above, to still give me the XXXXXXXXXXXXXXXXXXXXX as the result. the rest of the macro is already setup to run through the entire text file and uses the line of code above to extract the XXXXXXXXXXXXXXXXXXXXX each time and enter it in a cell, which works as expected for my original conditions. So it's just the line of code to extract the XXXXXXXXXXXXXXXXXXXXX from the new text structure that i need to modify.

I'm no excel genius, but I've dabbled many times, and can usually make things work since I do have a basic understanding of programming...but this one is making a fool of me.
here is the entire macro, in case that would be of assistance

Sub open_file2()
    Dim FSO As Object
    Dim blnOpen
    strFileToOpen = Application.GetOpenFilename(Title:="Select your PASS file")
    If strFileToOpen = False Then
      MsgBox "You did not select a PASS File", vbExclamation, "!"
      Exit Sub
    Else
        Sheet9.Range("G5").Value = strFileToOpen
        With GetObject(Sheet9.Range("G5").Value)
        sn = Split(Replace(Join(Filter(Filter(Split(.Content, ")"), "GS1"), "( ", 0), "|"), " GS1    : (", "'"), "|")
        .Close 0
    End With
     Range("C" & Rows.Count).End(xlUp).Offset(1).Resize(UBound(sn) + 1) = Application.Transpose(sn)
    End If
    Sheet9.Range("G5").clear
End Sub