Page 1 of 1
[Solved] Comparing Columns/Fields
Posted: Sat Jan 02, 2016 11:52 pm
by mohsyn
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.
Re: Comparing Columns/Fields
Posted: Sun Jan 03, 2016 1:27 am
by mohsyn
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.
Re: [Solved] Comparing Columns/Fields
Posted: Thu Jan 07, 2016 4:58 pm
by DataMystic Support
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 ]