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:

[WebDNA] Credit card processing (2012) Kaaaaahhhhhhhnnnnnnn! (1997) How much is too much? I can never remember the answer. (2002) Comments in db? (1997) Running _every_ page through WebCat ? (1997) New to WebCat, Help. (1998) RE: OK, here goes... (1997) PLEASE REMOVE MY EMAIL ADDRESS (1997) [applescript] (1999) [OT] SQL and Crackers (2000) [ShowCart] and GET vs. POST (1997) Can GMT be called from the OS ? (2004) Summing fields (1997) RE: OK, here goes... (1997) [WebDNA] unix timestamp in WebDNA (2009) Nesting FoundItem Context (1997) question: webdelivery folder and file (1997) Country & Ship-to address & other fields ? (1997) changing creator codes (2000) Hierarchy of form/text/math variables (renamed thread) (2000)