Discussion:
Can you suggest a regular expressions search for this project?
(too old to reply)
David B
2004-03-05 21:07:44 UTC
Permalink
I need to revise an enormous table. My first task is to strip the
formatting down to the bare essentials.

The first cell in ever row looks like this, except that the id number
varies:

<TD id="G28" ALIGN="LEFT"><P
STYLE="margin-left:10px;font-size:8pt;text-align:left;">

Every other cell looks like this, except that the "headers=" value changes:

<TD NOWRAP headers="G28" ALIGN="RIGHT"><P STYLE="text-align:right;">


So I'd like to do a search and replace that will replace <TD NOWRAP
headers="G28" ALIGN="RIGHT"><P STYLE="text-align:right;"> with <td>, <td
class=""> or something like that.

Also, is there a way to impart classes and ids to table cells in a table
that's too big to open with Dreamweaver? In other words, is there a way
to instruct Dreamweaver to make every cell in the third column <td
class="area"> and every cell in the fourth column <td class="land">,
after I open the Search and Replace function and navigate to that page
remotely?

If it can't be done, I can view the page's source code and copy more
manageable portions of it into separate pages. Below is the code from a
couple complete rows:

<TR>
<TD id="G26" ALIGN="LEFT"><P
STYLE="margin-left:10px;font-size:8pt;text-align:left;">DeKalb
County</P></TD>
<TD NOWRAP headers="G26" ALIGN="RIGHT"><P
STYLE="text-align:right;">64,452</P></TD>
<TD NOWRAP headers="G26" ALIGN="RIGHT"><P
STYLE="text-align:right;">92.6</P></TD>
<TD NOWRAP headers="G26" ALIGN="RIGHT"><P
STYLE="text-align:right;">1.7</P></TD>
<TD NOWRAP headers="G26" ALIGN="RIGHT"><P
STYLE="text-align:right;">0.8</P></TD>
<TD NOWRAP headers="G26" ALIGN="RIGHT"><P
STYLE="text-align:right;">0.2</P></TD>
<TD NOWRAP headers="G26" ALIGN="RIGHT"><P
STYLE="text-align:right;">0.1</P></TD>
<TD NOWRAP headers="G26" ALIGN="RIGHT"><P
STYLE="text-align:right;">3.1</P></TD>
<TD NOWRAP headers="G26" ALIGN="RIGHT"><P
STYLE="text-align:right;">1.6</P></TD>
<TD NOWRAP headers="G26" ALIGN="RIGHT"><P
STYLE="text-align:right;">5.6</P></TD>
<TD NOWRAP headers="G26" ALIGN="RIGHT"><P
STYLE="text-align:right;">90.7</P></TD>

</TR>
<TR>
<TD id="G27" ALIGN="LEFT"><P
STYLE="margin-left:10px;font-size:8pt;text-align:left;">Elmore
County</P></TD>
<TD NOWRAP headers="G27" ALIGN="RIGHT"><P
STYLE="text-align:right;">65,874</P></TD>
<TD NOWRAP headers="G27" ALIGN="RIGHT"><P
STYLE="text-align:right;">77.0</P></TD>
<TD NOWRAP headers="G27" ALIGN="RIGHT"><P
STYLE="text-align:right;">20.6</P></TD>
<TD NOWRAP headers="G27" ALIGN="RIGHT"><P
STYLE="text-align:right;">0.4</P></TD>
<TD NOWRAP headers="G27" ALIGN="RIGHT"><P
STYLE="text-align:right;">0.4</P></TD>
<TD NOWRAP headers="G27" ALIGN="RIGHT"><P
STYLE="text-align:right;">0.0</P></TD>
<TD NOWRAP headers="G27" ALIGN="RIGHT"><P
STYLE="text-align:right;">0.5</P></TD>
<TD NOWRAP headers="G27" ALIGN="RIGHT"><P
STYLE="text-align:right;">1.0</P></TD>
<TD NOWRAP headers="G27" ALIGN="RIGHT"><P
STYLE="text-align:right;">1.2</P></TD>
<TD NOWRAP headers="G27" ALIGN="RIGHT"><P
STYLE="text-align:right;">76.5</P></TD>
</TR>
<TR>
<TD id="G28" ALIGN="LEFT"><P
STYLE="margin-left:10px;font-size:8pt;text-align:left;">Escambia
County</P></TD>
<TD NOWRAP headers="G28" ALIGN="RIGHT"><P
STYLE="text-align:right;">38,440</P></TD>
<TD NOWRAP headers="G28" ALIGN="RIGHT"><P
STYLE="text-align:right;">64.4</P></TD>
<TD NOWRAP headers="G28" ALIGN="RIGHT"><P
STYLE="text-align:right;">30.8</P></TD>
<TD NOWRAP headers="G28" ALIGN="RIGHT"><P
STYLE="text-align:right;">3.0</P></TD>
<TD NOWRAP headers="G28" ALIGN="RIGHT"><P
STYLE="text-align:right;">0.2</P></TD>
<TD NOWRAP headers="G28" ALIGN="RIGHT"><P
STYLE="text-align:right;">0.0</P></TD>
<TD NOWRAP headers="G28" ALIGN="RIGHT"><P
STYLE="text-align:right;">0.4</P></TD>
<TD NOWRAP headers="G28" ALIGN="RIGHT"><P
STYLE="text-align:right;">1.1</P></TD>
<TD NOWRAP headers="G28" ALIGN="RIGHT"><P
STYLE="text-align:right;">1.0</P></TD>
<TD NOWRAP headers="G28" ALIGN="RIGHT"><P
STYLE="text-align:right;">63.9</P></TD>
</TR>
<TR>
<TD id="G29" ALIGN="LEFT"><P
STYLE="margin-left:10px;font-size:8pt;text-align:left;">Etowah
County</P></TD>
<TD NOWRAP headers="G29" ALIGN="RIGHT"><P
STYLE="text-align:right;">103,459</P></TD>
<TD NOWRAP headers="G29" ALIGN="RIGHT"><P
STYLE="text-align:right;">82.9</P></TD>
<TD NOWRAP headers="G29" ALIGN="RIGHT"><P
STYLE="text-align:right;">14.7</P></TD>
<TD NOWRAP headers="G29" ALIGN="RIGHT"><P
STYLE="text-align:right;">0.3</P></TD>
<TD NOWRAP headers="G29" ALIGN="RIGHT"><P
STYLE="text-align:right;">0.4</P></TD>
<TD NOWRAP headers="G29" ALIGN="RIGHT"><P
STYLE="text-align:right;">0.0</P></TD>
<TD NOWRAP headers="G29" ALIGN="RIGHT"><P
STYLE="text-align:right;">0.7</P></TD>
<TD NOWRAP headers="G29" ALIGN="RIGHT"><P
STYLE="text-align:right;">0.9</P></TD>
<TD NOWRAP headers="G29" ALIGN="RIGHT"><P
STYLE="text-align:right;">1.7</P></TD>
<TD NOWRAP headers="G29" ALIGN="RIGHT"><P
STYLE="text-align:right;">82.1</P></TD>
</TR>
Barry Pearson
2004-03-06 11:18:20 UTC
Permalink
Post by David B
I need to revise an enormous table. My first task is to strip the
formatting down to the bare essentials.
[snip]

Before using regular expressions, try using "Search for Specific tag" in the
Find & replace" dialogue box. ("Specific tag" is in a drop down menu in my
version).

Then you can do all sorts of things such as removing specific attributes, etc.
I don't know whether it is sufficient for you, but it may be.
--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Joe Makowiec
2004-03-06 12:47:11 UTC
Permalink
Post by David B
I need to revise an enormous table. My first task is to strip the
formatting down to the bare essentials.
You could try exporting the table data as Comma Separated Values (.csv)
and re-importing. Put your cursor in the table, and then File>Export>
Table. Then create a new page, File>Import, and you should have your
data without any formatting.
--
Joe Makowiec can be reached at:
http://makowiec.org/contact/?Joe
Loading...