joining of the second part of the line

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

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

joining of the second part of the line

Postby sardaukar22 » Sat Nov 18, 2006 1:22 am

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

Postby DataMystic Support » Tue Nov 21, 2006 6:39 am

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

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

Postby sardaukar22 » Fri Nov 24, 2006 11:22 pm

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

Postby sardaukar22 » Fri Nov 24, 2006 11:28 pm

Wonderfull program!

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

Postby DataMystic Support » Sun Nov 26, 2006 7:57 pm

Thank you! Please recommend it to other people.
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