replace within customer area of an line

Get help with installation and running here.

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

Post Reply
terror

replace within customer area of an line

Post by terror »

From what Ive read about the latest release of wordpipe I might be able to get this job done.
I just dont know exactly how to setup Wordpipe to do so....

I have an certain .TXT file in many subfolders..
On each line is an table split into two sections (</td><td>...)
the first section includes an linked image,
the second section includes some link text.
But the link text is where i need to change..

The link text is the same text as the link url without the file extension.

example:
<a href=http://domain.com/1/2/party.php>party</a>

The project Im working on is in this format, one per line, txt file:

... <a href=http://domain.com/1/2/may-15-party.php class=SmallHeaderBlue>may-15-party</a></TD></TR></TABLE>

Is it possible to format only the link text to, replace the "-" with an blank space, and remove the word "party":

... <a href=http://domain.com/1/2/may-15-party.php class=SmallHeaderBlue>may 15</a></TD></TR></TABLE>

Using "class=SmallHeaderBlue>" as an starting point and "</a></TD></TR></TABLE>" as an stopping point to search $ replace??
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support »

You mean TextPipe, not WordPipe!

Use an HTML restriction to restrict to the <A tag first.

Inside this, put two search and replaces - one for the dash and one for 'party'
terror

Post by terror »

Use an HTML restriction to restrict to the <A tag first.

Inside this, put two search and replaces - one for the dash and one for 'party'
_________________
Regards,
Iam relieved to know this can be done with TextPipe! but i do have to ask if an more indepth instruction set could be wrote???

below I have shown an example line, each line after is very similiar except for the car model:

<table cellpadding="0" cellspacing="0" border="0"><tr><td><a href="Auburn-4-44.php"><IMG src="image/bulletsm.gif" width="6" height="7" border="0" class="shakeimage" onMouseover="init(this);rattleimage();" onMouseout="stoprattle(this);top.focus();" onClick="top.focus()"></a></td><td width="2"></td><td><a href="Auburn-4-44.php" class="SmallHeaderBlue">Auburn-4-44</a></TD></TR></TABLE>
SmallHeaderBlue">Auburn-4-44</a></TD></TR></TABLE>
after
SmallHeaderBlue">4 44</a></TD></TR></TABLE>
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support »

Search for pattern:

Code: Select all

(SmallHeaderBlue">)(.*)-(\d+)-(\d+)(</a>)
replace with

Code: Select all

$1$3 $4$5
terror

Post by terror »

Hello

Im not finding this answer easy to do. I wish to learn how to search and replace within an area on each line.
... search type...search location...inside field codes...?? I dont know
Ive tried a few combinations, however no changes happened.
I do have MS WORD.

randum three lines from an txt file before:

<table border="0"><tr><td><a href="1901-Oldsmobile-Runabout.php"><IMG src="bulletsm.gif" border="0"></a></td><td width="2"></td><td><a href="1901-Oldsmobile-Runabout.php" class="SmallHeaderBlue">1901-Oldsmobile-Runabout</a></TD></TR></TABLE>
<table border="0"><tr><td><a href="1962-Oldsmobile-Jetfire.php"><IMG src="bulletsm.gif" border="0"></a></td><td width="2"></td><td><a href="1962-Oldsmobile-Jetfire.php" class="SmallHeaderBlue">1962-Oldsmobile-Jetfire</a></TD></TR></TABLE>
<table border="0"><tr><td><a href="1966-Oldsmobile-Toronado.php"><IMG src="bulletsm.gif" border="0"></a></td><td width="2"></td><td><a href="1966-Oldsmobile-Toronado.php" class="SmallHeaderBlue">1966-Oldsmobile-Toronado</a></TD></TR></TABLE>

and after, with the result Im searching to do with your software:

<table border="0"><tr><td><a href="1901-Oldsmobile-Runabout.php"><IMG src="bulletsm.gif" border="0"></a></td><td width="2"></td><td><a href="1901-Oldsmobile-Runabout.php" class="SmallHeaderBlue">1901 Runabout</a></TD></TR></TABLE>
<table border="0"><tr><td><a href="1962-Oldsmobile-Jetfire.php"><IMG src="bulletsm.gif" border="0"></a></td><td width="2"></td><td><a href="1962-Oldsmobile-Jetfire.php" class="SmallHeaderBlue">1962 Jetfire</a></TD></TR></TABLE>
<table border="0"><tr><td><a href="1966-Oldsmobile-Toronado.php"><IMG src="bulletsm.gif" border="0"></a></td><td width="2"></td><td><a href="1966-Oldsmobile-Toronado.php" class="SmallHeaderBlue">1966 Toronado</a></TD></TR></TABLE>

more about this project..

I have many folders, for the above would be the "Oldsmobile" folder. I would be searching for "-" to replace with an blank space. And search for "Oldsmobile" and delete it. My other folders would be similiar except for the folder could be called "Acura".
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support »

Answered via email.
Post Reply