Can your program do this?

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

JMapleton
Posts: 2
Joined: Wed Aug 27, 2008 9:33 pm

Can your program do this?

Postby JMapleton » Wed Aug 27, 2008 9:45 pm

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)?

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

Re: Can your program do this?

Postby DataMystic Support » Wed Aug 27, 2008 10:51 pm

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

JMapleton
Posts: 2
Joined: Wed Aug 27, 2008 9:33 pm

Re: Can your program do this?

Postby JMapleton » Thu Aug 28, 2008 1:24 am

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.

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

Re: Can your program do this?

Postby DataMystic Support » Thu Aug 28, 2008 6:09 am

TextPipe Lite will work fine for this - DataPipe is for replacing in databases as well (it includes TextPipe Pro).
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: Yahoo [Bot] and 2 guests