W
Wedgie
Hi everyone,
I was looking for a freeware program to help me with a problem I'm
having. I don't really know what to search by though, so I was hoping
if I explained the problem, someone may be able to suggest something.
To start with, I have a large text file. The format is one entry of a
number of lines, followed by another entry of a number of lines,
followed bymore entries. The format is roughly:
(First entry)
A code associated with first entry
Another code associated with first entry
some data associated with first entry
some data associated with first entry
some date associated with first entry
QA {number}
(Second entry)
A code associated with second entry
Another code associated with second entry
some data associated with second entry
QA {number}
(Third entry}
A code associated with third entry
Another code associated with third entry
some data associated with third entry
some data associated with third entry
some data associated with third entry
some data associated with third entry
some data associated with third entry
QA {number}
etc
etc
Now, QA {number} above is the important bit. This is literally the
letters 'QA' followed by a couple of spaces, followed by a number (can
be any number, 99% of the time it will be in the range 0-9). Now, what
I want to do is hopefully find a program that will scan that QA line
for {number} > 0 and then return the data above it (from 'A code' to
'QA {number}' into a new file. That is, if the number just after QA is
not a zero for any entry in this text file, I want it to copy the data
above it (ie belonging to that entry), into a new file (I want all non
zero entries in the original file to be copied to a single, new file).
The reason why I want it to do this is that I currently go through
this file manually, making note of which entries have a non zero QA
value and copying their details down. This file everyday has a few
hundred entries in it (which takes a lot of time to go through), but
the great majority of them are zero value QA's, so I only end up using
a few of the entries. If I can find a program that can copy the half
dozen or so non zero values (and the data just above them), to a new
file, it would make things so much easier for me. As I said though, I
have no idea what sort of program to search for. Text manipulation?
Text editing? Text search? Can anyone help?
I was looking for a freeware program to help me with a problem I'm
having. I don't really know what to search by though, so I was hoping
if I explained the problem, someone may be able to suggest something.
To start with, I have a large text file. The format is one entry of a
number of lines, followed by another entry of a number of lines,
followed bymore entries. The format is roughly:
(First entry)
A code associated with first entry
Another code associated with first entry
some data associated with first entry
some data associated with first entry
some date associated with first entry
QA {number}
(Second entry)
A code associated with second entry
Another code associated with second entry
some data associated with second entry
QA {number}
(Third entry}
A code associated with third entry
Another code associated with third entry
some data associated with third entry
some data associated with third entry
some data associated with third entry
some data associated with third entry
some data associated with third entry
QA {number}
etc
etc
Now, QA {number} above is the important bit. This is literally the
letters 'QA' followed by a couple of spaces, followed by a number (can
be any number, 99% of the time it will be in the range 0-9). Now, what
I want to do is hopefully find a program that will scan that QA line
for {number} > 0 and then return the data above it (from 'A code' to
'QA {number}' into a new file. That is, if the number just after QA is
not a zero for any entry in this text file, I want it to copy the data
above it (ie belonging to that entry), into a new file (I want all non
zero entries in the original file to be copied to a single, new file).
The reason why I want it to do this is that I currently go through
this file manually, making note of which entries have a non zero QA
value and copying their details down. This file everyday has a few
hundred entries in it (which takes a lot of time to go through), but
the great majority of them are zero value QA's, so I only end up using
a few of the entries. If I can find a program that can copy the half
dozen or so non zero values (and the data just above them), to a new
file, it would make things so much easier for me. As I said though, I
have no idea what sort of program to search for. Text manipulation?
Text editing? Text search? Can anyone help?