Re: GREP for search - not replace

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 60402
interpreted = N
texte = search=.*Last-modified:([^%0A%0D]*).* replace=\1 Here's something (untested) that should be close. Bill -----Original Message----- From: Joe D'Andrea Sent: Thu, 9 Dec 2004 11:48:29 -0500 To: "WebDNA Talk" Subject: GREP for search - not replace I have a little monitor that grabs web pages using TCPCONNECT. I want to grab some info from the headers. Let's say the headers are: HTTP/1.1 200 OK Server: Netscape-Enterprise/6.0 Date: Thu, 09 Dec 2004 15:44:35 GMT Content-length: 8269 Content-type: text/html Last-modified: Thu, 09 Dec 2004 14:56:21 GMT Accept-ranges: bytes Connection: close What I need is the modified date and the content length. I've used the middle context in the past like this: Modified Date= [text show=t][middle startafter=Last-modified: &endbefore=Accept-ranges:][PageContent][/middle][/text] But now we're hitting servers that don't return the headers in the same order that the current servers do. Regardless, I am wanting to use grep for this operation. What I'm looking for is a little help that will find just the value and replace everything except the value with null. Any thoughts on a grep strting? Thanks, ~joe -- _______________________________________________________________ Joseph D'Andrea ~ http://www.west21.com/ ~ JoeDan@West21.com WEST21.com Internet services for the 21st Century webhosting ~ co-location ~ wireless access ~ WebCat programming ------------------------------------------------------------- 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/ ------------------------------------------------------------- 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 for search - not replace ( devaulw@onebox.com 2004)
  2. GREP for search - not replace ( Joe D'Andrea 2004)
search=.*Last-modified:([^%0A%0D]*).* replace=\1 Here's something (untested) that should be close. Bill -----Original Message----- From: Joe D'Andrea Sent: Thu, 9 Dec 2004 11:48:29 -0500 To: "WebDNA Talk" Subject: GREP for search - not replace I have a little monitor that grabs web pages using TCPCONNECT. I want to grab some info from the headers. Let's say the headers are: HTTP/1.1 200 OK Server: Netscape-Enterprise/6.0 Date: Thu, 09 Dec 2004 15:44:35 GMT Content-length: 8269 Content-type: text/html Last-modified: Thu, 09 Dec 2004 14:56:21 GMT Accept-ranges: bytes Connection: close What I need is the modified date and the content length. I've used the middle context in the past like this: Modified Date= [text show=t][middle startafter=Last-modified: &endbefore=Accept-ranges:][PageContent][/middle][/text] But now we're hitting servers that don't return the headers in the same order that the current servers do. Regardless, I am wanting to use grep for this operation. What I'm looking for is a little help that will find just the value and replace everything except the value with null. Any thoughts on a grep strting? Thanks, ~joe -- _______________________________________________________________ Joseph D'Andrea ~ http://www.west21.com/ ~ JoeDan@West21.com WEST21.com Internet services for the 21st Century webhosting ~ co-location ~ wireless access ~ WebCat programming ------------------------------------------------------------- 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/ ------------------------------------------------------------- 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/ devaulw@onebox.com

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:

tab deliminated txt file (2001) shownext (1997) WCS Newbie question (1997) Help formatting search results w/ table (1997) Re:WebCat Emailer & Liststar (1997) Summing fields (1997) webcat nt (1997) [append] and SSL (1997) Probably a very simple question? (1997) WebCat & Liststar (1997) Bug? (1997) quantity minimum problem (1997) Explorer oddities (1997) I'm Baaaaaaaaaack - Questions! (2000) Sub Totals (2000) Using Applescript to process WebCatalog functions (1998) Upgrading to 4.0 (2000) Our Webcat site launched (1997) Auto SKU's (2000) Banners (1997)