Page 1 of 1

Can your program do this?

Posted: Wed Aug 27, 2008 9:45 pm
by JMapleton
I have a website with thousands of pages and most all the pages are very very similar in structure.

I want to add a few lines of code to the same section of each page that may need to "bump" the rest of the html downway, thus adding to the total number of html lines on the page.

For example, I have this on my site:

<html line 1>
<html line 2>
<html line 3>
<html line 4>
<html line 5>

And I want to add this between html line 3 and html line 4:

<new html line 1>
<new html line 2>

So I want it to look like this:

<html line 1>
<html line 2>
<html line 3>
<new html line 1>
<new html line 2>
<html line 4>
<html line 5>

Not this:

<html line 1>
<html line 2>
<new html line 1>
<new html line 2>
<html line 5>

Can your program do this? I mean, do a find/replace without replacing, just adding (thus adding to the total number of lines)?

Re: Can your program do this?

Posted: Wed Aug 27, 2008 10:51 pm
by DataMystic Support
Easy - just ensure the before and after text is captured so that you can include it in the replacement

e.g. find perl pattern:

Code: Select all

(abc)(def)
Replace with

Code: Select all

$1 hello $2
will find abcdef and replace with 'abc hello def'

Re: Can your program do this?

Posted: Thu Aug 28, 2008 1:24 am
by JMapleton
Great! I'll be purchasing your product soon!

Is it TextPipe or DataPipe what you would recommend for something like this? Would the Lite version of TextPipe work for this (find/insert text into html documents)?

The Pro version sounds neat and I could use that for a few other projects I've been planning but I just want to get a feel for things at first.

Thanks.

Re: Can your program do this?

Posted: Thu Aug 28, 2008 6:09 am
by DataMystic Support
TextPipe Lite will work fine for this - DataPipe is for replacing in databases as well (it includes TextPipe Pro).