Re: Grep doesn't work the same?

This WebDNA talk-list message is from

2005


It keeps the original formatting.
numero = 63272
interpreted = N
texte = Kenneth Grome wrote: > Does anyone have an explanation why? Is there a new grep library in > webdna that doesn't work the same as the old one? Since you decided not to tell us anything about your environment, I am left to guess that you went from a Mac to Linux. [grep] is a line-based regex engine, meaning that it can only affect text up to (but not including) the end of line character (EOL). If it used to work on the Mac, that should probably be viewed as a bug in the implementation on the Mac more than anything else. The Perl regex engine can be instructed to include multiline strings (in which case you can mess with the EOL), but this is not typically of most regex libraries. > Does anyone know how to strip out cr's from templates since this doesn't seem to work any more? Don't bother. It really isn't worth it in terms of server performance and it makes your site very hard to read in view source. In fact, done incorrectly it could lead to words being run together. If you are genuinely concerned about server performance, for example if you have a very slow connection to the Internet, and you are running Apache 2.0 or better, consider enabling mod_deflate, which will compress the text sent to the browser on the fly (all modern browsers handle this without a problem). See this page: http://httpd.apache.org/docs/2.0/mod/mod_deflate.html for details and suggested config file settings. John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747 ------------------------------------------------------------- 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: Grep doesn't work the same? ( John Peacock 2005)
  2. Grep doesn't work the same? ( Kenneth Grome 2005)
Kenneth Grome wrote: > Does anyone have an explanation why? Is there a new grep library in > webdna that doesn't work the same as the old one? Since you decided not to tell us anything about your environment, I am left to guess that you went from a Mac to Linux. [grep] is a line-based regex engine, meaning that it can only affect text up to (but not including) the end of line character (EOL). If it used to work on the Mac, that should probably be viewed as a bug in the implementation on the Mac more than anything else. The Perl regex engine can be instructed to include multiline strings (in which case you can mess with the EOL), but this is not typically of most regex libraries. > Does anyone know how to strip out cr's from templates since this doesn't seem to work any more? Don't bother. It really isn't worth it in terms of server performance and it makes your site very hard to read in view source. In fact, done incorrectly it could lead to words being run together. If you are genuinely concerned about server performance, for example if you have a very slow connection to the Internet, and you are running Apache 2.0 or better, consider enabling mod_deflate, which will compress the text sent to the browser on the fly (all modern browsers handle this without a problem). See this page: http://httpd.apache.org/docs/2.0/mod/mod_deflate.html for details and suggested config file settings. John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747 ------------------------------------------------------------- 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/ John Peacock

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:

[Reload mydata.db] (1998) Error:Too many nested [xxx] contexts (1997) Doctype (2004) WebCat2b12plugin - [search] is broken ... not! (1997) Netscape 3.01 can't see db in form (was problems problemsproblems) (1997) [WriteFile] problems (1997) [WebDNA] group searching not working as expected. (2010) Add more fields to an existent data base (1997) sort problems....bug or brain fart? (1997) Sticky .inc file! (2008) Documentation Feedback (1997) RE: protect tag on NT (1997) Include a big block of text (1997) WebCatalog NT beta 18 now available (1997) Showif Context combined with Search (1997) CC: (1998) WebCatalog Technical Reference (1997) Multiple catalog databases and showcart (1997) Header Problems (1998) [WebDNA] reverse rank=off (2008)