GBraniger
02-25-2015, 03:28 AM
I have a very long string of data in a word document that I need to add line breaks to make it more readable. The string follows this criteria:
The data starts as one long string with a small header (below would be ABC110) and then will always have a H001 to follow. Then moves based on the value following the 001. So for H001 it is 26 bytes long, C001 it is 29 bytes long, S001 is 21 bytes long, and A001 is 9 bytes long. There is always a space after the length.
ABC110H00126 several bytes laterC00129 Another length of dataS00121 more data hereS00121 more data hereA0019 end
The above data would end up looking like:
ABC110
H00126 several bytes later
C00129 Another length of data
S00121 more data here
S00121 more data here
A0019 end
I would really like to automate this formatting considering my data is normally around 25,000 bytes long and would break down to about 150 lines on average. Doing this 10 to 20 times a day is just taking too much time!
Thanks for the help!
Greg
The data starts as one long string with a small header (below would be ABC110) and then will always have a H001 to follow. Then moves based on the value following the 001. So for H001 it is 26 bytes long, C001 it is 29 bytes long, S001 is 21 bytes long, and A001 is 9 bytes long. There is always a space after the length.
ABC110H00126 several bytes laterC00129 Another length of dataS00121 more data hereS00121 more data hereA0019 end
The above data would end up looking like:
ABC110
H00126 several bytes later
C00129 Another length of data
S00121 more data here
S00121 more data here
A0019 end
I would really like to automate this formatting considering my data is normally around 25,000 bytes long and would break down to about 150 lines on average. Doing this 10 to 20 times a day is just taking too much time!
Thanks for the help!
Greg