Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find and Replace Help

Status
Not open for further replies.

yippiekyyay

Programmer
Oct 26, 2002
186
CA
Hello,

I'm trying to convert several Word documents into HTML. To save time, I thought I'd convert them all to html format from within Word and then do an Extended Find and Replace on all the tags to remove the attributes.

The problem is that almost every tag has unique attributes, so I'd like to use wildcards but nothing I've tried seems to work - i.e.:
Find: <td*>
(to find something like <td width=295 valign=top style='width:221.5pt;border:solid black 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt;height:15.0pt'>)
Replace with: <td>

Has anyone had any success with anything like this?

Thanks in advance!

-Saen
 
I don't work with Word's HTML formatting, but is there a reason you cannot do the search and replace in Word itself? The extended search options include "Use wildcards". The search is case-sensitive, however, so you might have to search for <td *> and <TD *>. Of course, generated html should be in a consistent case.
 
Hey mdwyer - thanks for answering!

I have tried that before and the results were unpredictable. For instance, it would seem to skip tags that spaned more than one line.

I'm getting Office 2003 soon though - maybe it'll be better. I remember this way did work the best!

Cheers!
-Sean
 
Things are pretty quiet in this group.

What about using <td *^p*> to search for the 2-line tags? And <td *^p*^p*> for 3-line, etc. That's just a guess, but I suspect there is some limit to the wildcard search. O2003 would probably do the same.
 
Thanks for answering mdwyer! Sorry I took so long to respond - just back from holidays today :(

This morning, I downloaded a trial version of Dreamweaver and I already see much more functionality than I had with Homesite (not surprisingly - but I am amazed at all the options!).

This looks like it may help a lot - you can search for just specific tags with certain attributes set to specific values! I've already tested some of it but am still can't speak of all it can do.

Later,
-Sean
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top