Re: Is possible to use regex to read binary file?
Pattern I found is
Code
Sub test()
Dim txt As String, m As Object
txt = "FF7700000253206445018934551F81474554768FFFFF0015000A4800015A00024200016000013300013600013700015B00016600016500017700017800017E00" & _
"16900006 A00007900009300012200002100010900010A00012600010200010400010500010600011000010800012B00002C00012D00012E0001550001560007" & _
"2 A00002F0000300000310000FF7900800932C90688888000A000800935C90600008000000080093CC906888880008000800943C90688888000800005900F0102" & _
"000000308147526905FFFFFF00910F01020000013A81475269559FFFFF009310010C0000009F8147526905FFFFFF0101960F010E000000EB81475269596FFFFF" & _
"970 F01010006F69981475269563FFFFF00940E0001000001000100FFFF0000010195060003790001EA05820037060100000100650000000200000200180000" & _
"000300000300170000000400000400010000000500000500150000000A00FFFF006500000007802EC918009181475269539FFFFFFF009181475269539FFFFF00" & _
"103 CA030808FECB0A00000000000000000000CC0101811BC90B009181475269567FFFFFFFCA06000000000000CB0103CC0101"
With CreateObject("VBScript.RegExp")
.Global = True
.Pattern = "(^.*532064[^F]*.814[^F]*|5900.*(?=950))"
If .test(txt) Then
For Each m In .Execute(txt)
MsgBox m
Next
End If
End With
End Sub
Display More