Multiline Regular Expression search in Dreamweaver

Hi,

I am trying to change all tables in more than 50 pages to DIV and I have been trying for an hour to get it right but I can't seem to get it right.

I found this page which can strip off multiple comment lines.
http://www.tjkdesign.com/articles/whitespace.asp

But I am trying it on table and cannot get it right.

We have tables start like these:

<table border="0" cellpadding="0" cellspacing="0" width="1000"><!--page starts here-->
<tr>
<td colspan="3">

OR

<table border="0" cellpadding="0" cellspacing="0" width="800">
<!--page starts here-->
<tr>
<td colspan="3">

OR

<table border="0" cellpadding="0" cellspacing="0" width="800">
<!--main table for page-->
<tr><td colspan="3">

OR

<table border="0" cellpadding="0" cellspacing="0" width="800">
<tr>
<td colspan="3">

etc...

What I want is to replace these to:

<div id="body>

and I tried this:

<table border="0" cellpadding="0" cellspacing="0" width="([^\*]|[^/].*?)\3">

But it is not working. It is only searching for table tags which starts with:

<table border="0" cellpadding="0" cellspacing="0" width="

and ends with:

3">

But not the codes mentioned above. Someone please help.
openaccount1Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shinesh PremrajanEngineering ManagerCommented:
I dont know why you have \3 in the regular expression. Just give a try in the below REGEXP.

(<table border="0" cellpadding="0" cellspacing="0" width=")([^\*]|[^/].*?)(">)
0
openaccount1Author Commented:
The result it is showing is only this:

<table border="0" cellpadding="0" cellspacing="0" width="1000">

It is not getting the codes down to the <td colspan="3">
0
Shinesh PremrajanEngineering ManagerCommented:
(<table border="0" cellpadding="0" cellspacing="0" width=")([0-9]{3,4})(">)(*.*)
(<tr>(*.*)
<td colspan="3">)
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

openaccount1Author Commented:
It says:
invalid quantifyer *"
0
Shinesh PremrajanEngineering ManagerCommented:
(<table border="0" cellpadding="0" cellspacing="0" width=")([0-9]{3,4})(">)(.*)
(<tr>)(.*)
(<td colspan="3">)

Hope this helps
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
openaccount1Author Commented:
ok, thanks. I simplified it to this:

<table border="0" cellpadding="0" cellspacing="0" width="(.*)
(.*)
(.*)colspan="3">

However i missed something.

some have the other codes after the width but they are not being added in the search result.

e.g.

<table border="0" cellpadding="0" cellspacing="0" width="1000" font="" face="Verdana, Arial, Helvetica, sans-serif" size="2">
<tr align="left">
<td valign="top" colspan="3">
0
openaccount1Author Commented:
Actually everything is ok now so no need to response to my last message.
0
openaccount1Author Commented:
This does what I needed to do. Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Dreamweaver

From novice to tech pro — start learning today.