Page 1 of 1

Extract Matching numbers from a file

Posted: Wed Apr 03, 2013 5:19 am
by access1denied
I have two files, the first file (FileA) is an excel file with only account numbers... the second file (File B) is a pipe (|) delimited file with 44 fields. If the account number in 'File A' matches the account number in field 28 of 'File B' then extract the full line.

I used 'Extract lines matching perl pattern' to do this, but it is searching for any matching number in 'File B'... that is not what I want.

Re: Extract Matching numbers from a file

Posted: Thu Apr 04, 2013 6:23 am
by access1denied
I don't know... I'm not feeling the love in here... I was able to accomplish this task using another tool... I was hopping to have done it with TP...

Re: Extract Matching numbers from a file

Posted: Tue Apr 09, 2013 10:08 pm
by DataMystic Support
You really need to move field 28 to position 1, then modify your account number list to be
^123
^345
etc - this forces the search replace to only match at the start of the line, which is where you moved it to.

You can then extract lines matching a list of patterns.

You can modify your account list in a separate filter, or in the same filter using subfilters to pre-modify the account list.