Page 1 of 1

Complicated replace

Posted: Thu Jul 06, 2006 8:01 pm
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!

Posted: Mon Jul 10, 2006 5:40 pm
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 -->