C#C
C#4y ago
Gibbo

Text Manipulation

evening all, anyone free to help with a text manipulation issue?
so im reading a log file that is in hex, ive used bit converter to push this out put to a RTB with no issues, my next task after a looking at how the hex is structured is to break the records into individual lines (records vary in length).

here is a sample of the file entry and 1 record

00-00-00-00-00-00-00-00-24-00-00-00-24-00-00-00-00-00-00-00-E4-07-09-00-02-09-16-00-11-00-00-00-1A-00-77-01-48-A9-B9-13-6E-56-03-40-D7-56-03-40-48-8D-AF-1E-E7-07-00-00-E4-17-09-DF-02-09-16-75-11-90-00-5C-1A-91-77-01-61-28-F4-18

there is some null data at the start that needs to be cleared out the 1st 47 characters
once that is done i need to search for "00-00-E" count back 6 chars from the 1st "0" and insert a line break "\n", ideally i need to loop this until the end of the file, then display the output into a rtb to verify its looking correct and then save it to a new txt file, so i can decode it later

2 record output
00-00-00-00-E4-07-09-00-02-09-16-00-11-00-00-00-1A-00-77-01-48-A9-B9-13-6E-56-03-40-D7-56-03-40-48-8D-AF-1E-E7-07-00-00-E4-17-09-DF-02-09-16-75-11-90-00-5C-1A-91-77-01-61-28-F4-18
01-00-00-00-E4-A7-09-96-02-00-16-79-11-E1-00-E6-22-CD-B4-00-A9-18-3D-10-F9-96-7E-89-E9-93-B4-3C-70-B1-C2-9F-ED-BD-6F-7A-5A-45-00-0B-7E-16-04-DC-3F-DB-40-F0-87-FE-81-35-DB-C4-93-DA-86-E1-8D-31-93-71-51-88-4F-91-12-73-B5-FF-99-40-3F-66-AE-06-B9-DD-75-52-79-CE-37-B5-91-77-FA-39-02-61-EE-67-15


i know the theory but lack ability at present any help appreciated
Was this page helpful?