Extract Matching numbers from a file

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
access1denied
Posts: 11
Joined: Wed Apr 03, 2013 4:40 am

Extract Matching numbers from a file

Post 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.
access1denied
Posts: 11
Joined: Wed Apr 03, 2013 4:40 am

Re: Extract Matching numbers from a file

Post 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...
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Extract Matching numbers from a file

Post 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.
Post Reply