I'm trying out TextPipe Pro, i've heard that it works wonders, but it doesn't seem to be doing what I need it to, which in my mind is pretty simple.
I have a database of about 7,000 products that have lengthy HTML descriptions - I"m trying to strip them down because it's slowing down the entire site.
I have a list of the things that I either need to remove or replace with other code. I have exported the data as a csv file. TextPipe Pro can't find anything I put in though, with exact match, perl, everything. I'm sure I'm doing something wrong, just can't figure out what.
I think it's because what I'm searching for is too long and wraps onto the next line.
Here is an example:
Replace:
<!-- BEGIN JBN CODE -->
</td></tr>
<tr><td width="100%" class="jbn_description_text"><p align="justify"><font class="jbn_description_title">
with:
<p align="justify" font class="jbn_description_text"><font class="jbn_description_title">
This is just one example, some of the other things I need to strip out are even longer than that
Can TPP do this, or am I barking up the wrong tree?
Thanks!
Search and replace HTML code
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
TextPipe handles multiple lines with ease, the problem here will be that what you're looking doesn't match what is in the file.
First, ensure that the file has DOS end-of-line characters (use Filters\Convert\End-of-lines).
Next, remove any stray spaces at the end of each line. In your search pattern you have stray spaces at the end of every line..
Finally, replace your line ends in the perl pattern with
[\r\n \t]* ie zero or more cr, lfs, spaces or tabs
So it would become (all on one line):
<!-- BEGIN JBN CODE -->[\r\n \t]*</td></tr>[\r\n \t]*<tr><td width="100%" class="jbn_description_text"><p align="justify"><font class="jbn_description_title">
BTW, our DataPipe product can apply this search/replace to your database directly, so there would be no need to extract and then re-load.
First, ensure that the file has DOS end-of-line characters (use Filters\Convert\End-of-lines).
Next, remove any stray spaces at the end of each line. In your search pattern you have stray spaces at the end of every line..
Finally, replace your line ends in the perl pattern with
[\r\n \t]* ie zero or more cr, lfs, spaces or tabs
So it would become (all on one line):
<!-- BEGIN JBN CODE -->[\r\n \t]*</td></tr>[\r\n \t]*<tr><td width="100%" class="jbn_description_text"><p align="justify"><font class="jbn_description_title">
BTW, our DataPipe product can apply this search/replace to your database directly, so there would be no need to extract and then re-load.
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact: