Re: How to remove comments with grep?

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 49355
interpreted = N
texte = >>Kenneth Grome wrote: >>My original webdna template file has a lot of webdna comments in >>it. I want to remove all these comments when writing this file to a >>new file. >> >>You cannot, at least not with grep alone. You need an actual >>parser (finite state machine actually) to correctly handle either >>WebDNA or HTML comments. > >Thanks John. It looks like I need a different solution than webdna ... ;) ... and I found it!It only took me about 20 minutes to find an AppleScript that does something similar to this. I just duplicated it and modified it, and now I have a new script that removes my WebDNA comments.I wrote another AppleScript that removes all the CR's as well. The only place this one cannot be used is in templates where I have used CR's inside a writefile context, for example -- but that's easily remedied by using [unurl]%0D[/unurl] instead of a CR ... ;)So now my files can easily be stripped down to the bare minimum size before I upload them to the server. -- Sincerely, Kenneth GromePS: My email address is kengrome@softhome.net until further notice.------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: How to remove comments with grep? (Kenneth Grome 2003)
  2. Re: How to remove comments with grep? (Kenneth Grome 2003)
  3. Re: How to remove comments with grep? (John Peacock 2003)
  4. How to remove comments with grep? (Kenneth Grome 2003)
>>Kenneth Grome wrote: >>My original webdna template file has a lot of webdna comments in >>it. I want to remove all these comments when writing this file to a >>new file. >> >>You cannot, at least not with grep alone. You need an actual >>parser (finite state machine actually) to correctly handle either >>WebDNA or HTML comments. > >Thanks John. It looks like I need a different solution than webdna ... ;) ... and I found it!It only took me about 20 minutes to find an AppleScript that does something similar to this. I just duplicated it and modified it, and now I have a new script that removes my WebDNA comments.I wrote another AppleScript that removes all the CR's as well. The only place this one cannot be used is in templates where I have used CR's inside a writefile context, for example -- but that's easily remedied by using [unurl]%0D[/unurl] instead of a CR ... ;)So now my files can easily be stripped down to the bare minimum size before I upload them to the server. -- Sincerely, Kenneth GromePS: My email address is kengrome@softhome.net until further notice.------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Kenneth Grome

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

WebCat hosting providers? (1997) Credit card processing - UK (1997) The beginning (1997) Help name our technology! I found it (1997) Frames and WebCat (1997) Some Questions (1997) Appended records getting deleted (in BannerSleuth) (2000) SendMail - Idea (2000) [WebDNA] group searching not working as expected. (2010) Location of Browser Info.txt file (1997) Showif, Hideif reverse logic ? (1997) Kaaaaahhhhhhhnnnnnnn! (1997) HELP WITH DATES (1997) WebCat2b12 - nesting [tags] (1997) Editing Users.db (1997) corrupted images (2002) FM and Webcat together? (1998) How is it done? (1998) Sku numbers (1997) Problems passing [SKU] with $Replace in 2.0 (1997)