Hi guys, I'm really new in this, I hope somebody help me.
There are lists within a document that contain many of the 33 different "Types" of products, but not all of them.
I need a kind of "filter" to extract only the number located between the strings "LIST:NUMBER=" and ",TYPES="
for all lines within a specific "Type" look up.
I have the follow pattern in a large text file (256MB about in size and 2.5 million lines more or less).
*******************************************************************************************************
SALE:NUMBER=12345678910:TYPE=XXXXX
LIST:NUMBER=12345678910,TYPES=Type1-1&Type2-10&Type4-2&Type5-1&...&Type31-1&Type32-0&Type33-0
SALE:NUMBER=56734520957:TYPE=XXXXX
LIST:NUMBER=56734520957,TYPES=Type1-1&Type3-1&Type4-2&Type5-1&...&Type31-1&Type32-0&Type33-0
SALE:NUMBER=77834002759:TYPE=XXXXX
LIST:NUMBER=77834002759,TYPES=Type1-1&Type2-10&Type4-2&Type5-1&...&Type31-1&Type32-0
.
.
more or less 2 million lines after
.
.
SALE:NUMBER=23111109385:TYPE=XXXXX
LIST:NUMBER=23111109385,TYPES=Type1-1&Type2-10&Type3-1&Type4-2&Type5-1&...&Type31-1&Type32-0&Type33-0
*******************************************************************************************************
What I need by examples;
Example 1:
If I want to filter for "Type2-10", the answer would be, in a new file, as follow:
************************************
12345678910
77834002759
.
.
.
23111109385
************************************
Example 2:
If I want to filter for "Type3-1" and "Type4-2", the answer would be, in a new file, as follow:
************************************
56734520957
.
.
.
23111109385
************************************
I made a macro that does a filter, but copies the complete line for every match and not only the number
between the strings like I said before.
Questions:
1) I don't know how to say the macro extract in a new file only the numbers between the strings explained above for every match found.
2) In other hand, I've used the next commands to make flexible the look up data, but something is wrong, because not always paste the same data. I think is something with the Clipboard but I don't know how to fix it.
The complete macro I have at the moment:
Thanks in advance.
Best regards.
There are lists within a document that contain many of the 33 different "Types" of products, but not all of them.
I need a kind of "filter" to extract only the number located between the strings "LIST:NUMBER=" and ",TYPES="
for all lines within a specific "Type" look up.
I have the follow pattern in a large text file (256MB about in size and 2.5 million lines more or less).
*******************************************************************************************************
SALE:NUMBER=12345678910:TYPE=XXXXX
LIST:NUMBER=12345678910,TYPES=Type1-1&Type2-10&Type4-2&Type5-1&...&Type31-1&Type32-0&Type33-0
SALE:NUMBER=56734520957:TYPE=XXXXX
LIST:NUMBER=56734520957,TYPES=Type1-1&Type3-1&Type4-2&Type5-1&...&Type31-1&Type32-0&Type33-0
SALE:NUMBER=77834002759:TYPE=XXXXX
LIST:NUMBER=77834002759,TYPES=Type1-1&Type2-10&Type4-2&Type5-1&...&Type31-1&Type32-0
.
.
more or less 2 million lines after
.
.
SALE:NUMBER=23111109385:TYPE=XXXXX
LIST:NUMBER=23111109385,TYPES=Type1-1&Type2-10&Type3-1&Type4-2&Type5-1&...&Type31-1&Type32-0&Type33-0
*******************************************************************************************************
What I need by examples;
Example 1:
If I want to filter for "Type2-10", the answer would be, in a new file, as follow:
************************************
12345678910
77834002759
.
.
.
23111109385
************************************
Example 2:
If I want to filter for "Type3-1" and "Type4-2", the answer would be, in a new file, as follow:
************************************
56734520957
.
.
.
23111109385
************************************
I made a macro that does a filter, but copies the complete line for every match and not only the number
between the strings like I said before.
Questions:
1) I don't know how to say the macro extract in a new file only the numbers between the strings explained above for every match found.
2) In other hand, I've used the next commands to make flexible the look up data, but something is wrong, because not always paste the same data. I think is something with the Clipboard but I don't know how to fix it.
Code: Select all
GetString "A filter over which Type?",
CutAppend
Find "^c"
NewFile
Paste
Code: Select all
InsertMode
ColumnModeOn
HexOff
UnixReOff
GotoLine 1 1
GetString "A filter over which Type?",
CutAppend
Find "^c"
NewFile
Paste
SaveAs "C:\Documents and Settings\My documents\Filter\^c List.TXT"
Best regards.