Complicated replace

Get help with installation and running here.

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

Post Reply
vasiliyb
Posts: 1
Joined: Thu Jul 06, 2006 7:42 pm

Complicated replace

Post by vasiliyb »

Can TextPipe software solve this task. If yes, how?
Excuse me for the bad english, but i try to explain my trouble.

I have about 600 files with very much alike structure:

Code: Select all

...arbitrary code...
<!-- Anchor of begin, identical in all 600 files -->
     Photo 1, unique file name
     Photo 2, unique file name
     Photo 3, unique file name
     ..... e.t.c., quantity of photos is different in various foles
<!-- Anchor of end, identical in all 600 files -->
...arbitrary code...
I need to duplicate data between anchors and write it below.
My example must look like this:

Code: Select all

...arbitrary code...
<!-- Anchor of begin, identical in all 600 files -->
     Photo 1, unique file name
     Photo 2, unique file name
     Photo 3, unique file name
     ..... e.t.c., quantity of photos is different in various foles
<!-- Anchor of end, identical in all 600 files -->
<!-- Anchor of begin inserting, identical in all 600 files -->
     Photo 1, unique file name
     Photo 2, unique file name
     Photo 3, unique file name
     ..... e.t.c., quantity of photos is different in various foles
<!-- Anchor of end inserting, identical in all 600 files -->
...arbitrary code...
Hope to see reply!
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 search/replace list this:

Code: Select all

<!-- Anchor of begin, identical in all 600 files -->[ capture(1+chars)]<!-- Anchor of end, identical in all 600 files --> 
and replace with:

Code: Select all

$0
<!-- Anchor of begin inserting, identical in all 600 files --> 
$1
<!-- Anchor of end inserting, identical in all 600 files --> 
Post Reply