This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > February 2004 > find & replace <!-- text in here -->





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author find & replace <!-- text in here -->
dreamdust

2004-02-26, 1:28 am

<!-- text in here -->

I've got these grey <!-- text in here --> I want to find throughout site and
replace with
nothing (delete). Find & Replace will not find these but they are there.
Tried a few find tag features but gave up.
Please help!

Thanks!

Tim Litwiller

2004-02-26, 2:28 am

change your mode to regex and try this as your search phrase
<!--.\b[\s\w]*-->
in english this means
<!-- followed by any character followed by a word boundary followed by
any word or space character repeated and number of times followed by -->

you could actually go down to
<!--[\s\w]*-->
which is
<!-- followed by any word or space character repeated any number of
times followed by -->

and as always try it on a backup file first.

dreamdust wrote:
> <!-- text in here -->
>
> I've got these grey <!-- text in here --> I want to find throughout site and
> replace with
> nothing (delete). Find & Replace will not find these but they are there.
> Tried a few find tag features but gave up.
> Please help!
>
> Thanks!
>


Tim Litwiller

2004-02-26, 2:28 am

hmm I just tried it on a template file - I guess you really don't want
to do that :)

it is to broad an expression
this would be better
<!--[\s]+text in here[\s]+-->
it requires the "text in here" part to be exact but allows different
amounts of space characters before and after

Tim Litwiller wrote:

> change your mode to regex and try this as your search phrase
> <!--.\b[\s\w]*-->
> in english this means
> <!-- followed by any character followed by a word boundary followed by
> any word or space character repeated and number of times followed by -->
>
> you could actually go down to
> <!--[\s\w]*-->
> which is
> <!-- followed by any word or space character repeated any number of
> times followed by -->
>
> and as always try it on a backup file first.
>
> dreamdust wrote:
>
>

Dan Vendel *GOF*

2004-02-26, 3:28 am

dreamdust wrote:

> <!-- text in here -->
>
> I've got these grey <!-- text in here --> I want to find throughout site and
> replace with
> nothing (delete). Find & Replace will not find these but they are there.
> Tried a few find tag features but gave up.
> Please help!
>
> Thanks!
>


FYI, I also tried various ways for a couple of minutes, but failed.
Might be that comment tags are regarded as ..comments. Therefore ignored
by the search.
Perhaps some RegEx wizard can give a hint, though...

--
Dan Vendel - *GOF*
Contact me directly at http://contact.vendel.info
Formmail tutorial at http://www.vendel.info/tut/formmail.html
Nested table demonstration at http://www.vendel.info/tabletut/
Search Engine Optimization & Rank Control Utility at http://awr.vendel.info
Search Dreamweaver newsgroup at http://www.vendel.info/google.html
hhgossen

2004-02-26, 5:28 am

Check "use regular expression" (may be a bit different, "Regul?ren Ausdruck
verwenden" in the German edition) and search the source code for <!--.*-->. Be
aware that comments like "<!-- InstanceEndEditable -->" are necessary if you
are using templates or library elements.



Alan Ames

2004-02-26, 7:28 am

Commands-->Cleanup html

put checkmark in Non-Dreamweaver Comments.
put checkmark in Dreamweaver comments if you want to strip those also
(layout table comments, fireworks png comments. Warning to not do this if
you've got Library items or Templates in this site)

that's page by page. Think there was a sitewide cleanup html from Massimo
http://massimocorner.com

> <!-- text in here -->
>
> I've got these grey <!-- text in here --> I want to find throughout site and
> replace with
> nothing (delete). Find & Replace will not find these but they are there.
> Tried a few find tag features but gave up.
> Please help!
>
> Thanks!
>


dreamdust

2004-02-27, 8:28 am

I have not tried anything yet. I have one library item!
Thanks
Sponsored Links


Copyright 2003 - 2009 forum4designers.com  Software forum  Computer Hardware reviews