joining of the second part of the line

Get help with installation and running here.

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

Post Reply
sardaukar22
Posts: 3
Joined: Sat Nov 18, 2006 1:12 am

joining of the second part of the line

Post by sardaukar22 »

I work with text that is made by lines separated in left and right part.

eg.

first part1==second part1
first part2==second part2
first part2==second part3
first part3==second part4

When first part is the same in the 2 lines or more, I need to join the second part of the next line with same first part with the previous line or

first part1==second part1
first part2==second part2, second part3
first part3==second part4

I guess it shoul use capture, but i don't know how? I will be thankfull if you can help me.
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support »

Use an EasyPattern to find

Code: Select all

[ capture( 1+ chars) , '==', capture( 0+ not cr or lf ), cr, lf,
  group1, '==', capture( 0+ not cr or lf ), cr, lf ]
replace with

Code: Select all

$1==$2, $3
You may need to add 3 copies of this search/replace to pick up 3/4/5 line repeats.
sardaukar22
Posts: 3
Joined: Sat Nov 18, 2006 1:12 am

Post by sardaukar22 »

Thank you, for your help.

I made a change becuse in some documents doesn't recognize , cr, lf] in the last part of the filtre i simply put return (enter) key.
sardaukar22
Posts: 3
Joined: Sat Nov 18, 2006 1:12 am

Post by sardaukar22 »

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

Post by DataMystic Support »

Thank you! Please recommend it to other people.
Post Reply