Re: Grepping to remove text & code

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 55803
interpreted = N
texte = I'm not exactly clear on what you want to do. Do you have a pattern like "ABCD DCBA ABCD" that you want to change to "ABCD DCBA XXXX", i.e. change one but not both ABCDs? If so, try searching for (ABCD.*)(ABCD) and replacing with \1XXXX. This matches the pattern and lets you re-use the part you want to keep with the first parantheses being replicated by a \1 and change the part that you don't by not using a \2. If I'm misunderstanding you, can you give before and after code snippets so I can try to approximate the grep more closely? Thanks, Bill -----Original Message----- From: Gary Krockover Sent: Fri, 30 Jan 2004 12:18:10 -0600 To: (WebDNA Talk) Subject: Grepping to remove text & code Hi all, Can I use a [grep] to strip all characters up to a point, leaving others intact, such as: [quote]Originally posted by: gjk:
(leave this alone) and a bunch of other code.... (strip all of this) The rest of the code/text (leave this alone) This opening table will always be the start of the strip: and that comment will always be the end: What's in between is the same table but with different values, so a super large converwords won't work here. If it helps, I can add some unique character or combination at the start/end of the strip.... Any hope? GK ------------------------------------------------------------- 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: Grepping to remove text & code ( Gary Krockover 2004)
  2. Re: Grepping to remove text & code ( Gary Krockover 2004)
  3. Re: Grepping to remove text & code ( Brian Fries 2004)
  4. Re: Grepping to remove text & code ( devaulw@onebox.com 2004)
  5. Grepping to remove text & code ( Gary Krockover 2004)
I'm not exactly clear on what you want to do. Do you have a pattern like "ABCD DCBA ABCD" that you want to change to "ABCD DCBA XXXX", i.e. change one but not both ABCDs? If so, try searching for (ABCD.*)(ABCD) and replacing with \1XXXX. This matches the pattern and lets you re-use the part you want to keep with the first parantheses being replicated by a \1 and change the part that you don't by not using a \2. If I'm misunderstanding you, can you give before and after code snippets so I can try to approximate the grep more closely? Thanks, Bill -----Original Message----- From: Gary Krockover Sent: Fri, 30 Jan 2004 12:18:10 -0600 To: (WebDNA Talk) Subject: Grepping to remove text & code Hi all, Can I use a [grep] to strip all characters up to a point, leaving others intact, such as: [quote]Originally posted by: gjk:
(leave this alone) and a bunch of other code.... (strip all of this) The rest of the code/text (leave this alone) This opening table will always be the start of the strip: and that comment will always be the end: What's in between is the same table but with different values, so a super large converwords won't work here. If it helps, I can add some unique character or combination at the start/end of the strip.... Any hope? GK ------------------------------------------------------------- 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:

Dates (1995) timing out? (1997) [WebDNA] encoding with webdna/JS, in context of various file encodings/charsets (2010) WebCat2b12--[searchstring] bug (1997) Clearing orders and database help! (1997) Email address checker (2002) [WebDNA] =?windows-1252?Q?Re=3A_=5BWebDNA=5D_Re=3A_=5BWebDNA=5D_=5BWebDNA=5D_Re=3A_=5BWebDNA=5D_=5BWeb?= (2012) Credit Card not accepted (1998) Not really WebCat- (1997) Cache headers - WebDNA 5 (2005) Cart Number sequence (1997) OK, here goes... (1997) View Source from cache (1997) WC 2.0 frames feature (1997) Math with Time (1997) [what] [am] [I] [missing]? (2003) Shopping Cart Directory (2000) Aaron kant add (or whatever it was) (2000) [table] strange behaviour (2003) RE: Web*SSL and WebCatalog (1997)