Replace function question....

Home » Forums » The HTML Editor » Replace function question....


Registered User
7 posts

If i wanted to use the replace function to delete all instances of comments in an html document how would I do this. I tried to put this in the replace function
<!-- * --> but that did not work. Does it have to be the exact comment to be found by the replace function?


Senior Advisor
6,674 posts
Online Now

Well hmm I was going to open the help file for this to see what it said in there, but it gave me a 404 not found website?
https://www.coffeecup.com/help/articles … d-replace/

I don't see anything that addresses any possible variables we can use when I looked in the PDF help file for CCHE so that didn't help. I've never had a variable work in a search/replace before so I'm not sure if it works in here or not. Jo Ann

http://lbwebsites.com just recently completed and open :)
http://northbaldwinliteracycouncil.org .... Our local Literacy Council

Due to spammers the below sites are not viewable outside the US, sorry guys :(
http://proudayou.com - My sons website for his music business
http://rockinwithmainstreet.com - My brother's band website


Registered User
150 posts

Yes, I would have thought so, any edit or replace function would only do EXACTLY what it was told... with no faffing about.Not easy if there are strings inside that are different... Peter
www.manxmaniac.co.uk


Registered User
383 posts

Wildcards used for replacement could be dangerous if set by default but it could be a good idea for an option.

Dave Dave
davethompson.co.nz


Registered User
277 posts

Hummmm!!!
I agree with Dave, replacing using an wildcard may be dangerous.
Why not using the "Find" function instead of "Replace" to finde the characteres "<!--" and then delete what you want. It will be a semi-automatic solution... Jimmy The Sailor
http://www.jimmythesailor.com (trying to show my photos)
http://www.art-i-batik.com (my wife's gallery)


Senior Advisor
2,641 posts

Wild Card is not a good thing, you might lose important things you might want to keep.

When I create a website - I typically put comments on a line for itself. Plus I usually modify my preferences for comments. In my case it is gray words on a light green background. That way they always stand out and I can easily find them and delete them out if I need to.

You might want to change your comment preferences so that you can see and manually delete them. I know it is not the perfect way, but it might make the job easier.

From Menu > Click Tools > Select Preferences > Click Customization Tab > Click Modified Highlight button > Under Elements Box click Comment >

Be sure the foreground and background box are unchecked and then you can select the colors for those features.

Idea:

It be wonderful if some day CoffeeCup would add a feature that allowed you to delete lines out of code if you had the number lines checked. Maybe a right click on the line number and allowed a copy, delete, paste above or below.... "Encourage one another daily, as long as it is called Today"
"It can only be dark, if there is no light." - Kim Rickman


Registered User
277 posts

Hi Kim
Nice tip, thanks a lot Jimmy The Sailor
http://www.jimmythesailor.com (trying to show my photos)
http://www.art-i-batik.com (my wife's gallery)

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.