[Solved] Comparing Columns/Fields

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

mohsyn
Posts: 2
Joined: Sat Jan 02, 2016 11:44 pm

[Solved] Comparing Columns/Fields

Postby mohsyn » Sat Jan 02, 2016 11:52 pm

i have a long list of email and passwords separated by tab
I need to compare and keep only the lines where email and password are same.
Unable to get it right.
Any heads up will be appreciated.
Last edited by mohsyn on Sun Jan 03, 2016 1:27 am, edited 1 time in total.

mohsyn
Posts: 2
Joined: Sat Jan 02, 2016 11:44 pm

Re: Comparing Columns/Fields

Postby mohsyn » Sun Jan 03, 2016 1:27 am

Found the solution:

Perl pattern [(?:((?:[^\t\n\f\r]+))\t(?:(?:\1)))(?:\r\n)] with [$0]
[ ] Match case
[ ] Whole words only
[ ] Case sensitive replace
[ ] Prompt on replace
[ ] Skip prompt if identical
[ ] First only
[X] Extract matches
Maximum text buffer size 4096
[ ] Maximum match (greedy)
[ ] Allow comments
[X] '.' matches newline
[ ] UTF-8 Support

It compares two words on a line separated by a tab and if they are same then keep the line.

User avatar
DataMystic Support
Site Admin
Posts: 2136
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: [Solved] Comparing Columns/Fields

Postby DataMystic Support » Thu Jan 07, 2016 4:58 pm

You could also do this more easily with a Filters\Extract\Extract lines matching (grep)

Using an EasyPattern of

Code: Select all

[capture(1+not tab) as 'first', tab, group1 ]
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: No registered users and 1 guest