Extract Matching numbers from a file

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

access1denied
Posts: 8
Joined: Wed Apr 03, 2013 4:40 am

Extract Matching numbers from a file

Postby access1denied » Wed Apr 03, 2013 5:19 am

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: 8
Joined: Wed Apr 03, 2013 4:40 am

Re: Extract Matching numbers from a file

Postby access1denied » Thu Apr 04, 2013 6:23 am

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: 2138
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Extract Matching numbers from a file

Postby DataMystic Support » Tue Apr 09, 2013 10:08 pm

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.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest