Re: Grep help needed

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 58984
interpreted = N
texte = [grep search=cart\=.[0-9]*&replace=] http://www.someurl.com?sku=21&cart=23234234[/grep] This works for me, but you would end up with and & on the end which you could grep out again if you wanted. On Aug 4, 2004, at 7:15 PM, Gary Krockover wrote: > Howdy list, > > I need some grep (I think) to strip the cart values out of a url; > > from: http://www.someurl.com?cart=2323423412 > to: http://www.someurl.com > > or also could be: > > from: http://www.someurl.com?sku=21&cart=23234234 > to: http://www.someurl.com?sku=21 > > I don't think [middle] is an option here, since the startafter will > vary if there's an &sku=## in the link and I don't think > [convertwords] will work either. I tried it in combination with a > grep to strip the numbers, and it would work but it's stripping the > number from the &sku= part which is no good. > > Digging through the archives now as I'm sure this has come up before, > but if anybody has any ideas/suggestions they would be appreciated! > > Gary > > > ------------------------------------------------------------- > 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 help needed ( Gary Krockover 2004)
  2. Re: Grep help needed ( Bob Minor 2004)
  3. Re: Grep help needed ( William DeVaul 2004)
  4. Grep help needed ( Gary Krockover 2004)
[grep search=cart\=.[0-9]*&replace=] http://www.someurl.com?sku=21&cart=23234234[/grep] This works for me, but you would end up with and & on the end which you could grep out again if you wanted. On Aug 4, 2004, at 7:15 PM, Gary Krockover wrote: > Howdy list, > > I need some grep (I think) to strip the cart values out of a url; > > from: http://www.someurl.com?cart=2323423412 > to: http://www.someurl.com > > or also could be: > > from: http://www.someurl.com?sku=21&cart=23234234 > to: http://www.someurl.com?sku=21 > > I don't think [middle] is an option here, since the startafter will > vary if there's an &sku=## in the link and I don't think > [convertwords] will work either. I tried it in combination with a > grep to strip the numbers, and it would work but it's stripping the > number from the &sku= part which is no good. > > Digging through the archives now as I'm sure this has come up before, > but if anybody has any ideas/suggestions they would be appreciated! > > Gary > > > ------------------------------------------------------------- > 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/ Bob Minor

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:

WebCat2 Append problem (B14Macacgi) (1997) PCS Emailer's role ? (1997) WebCat2b15MacPlugin - showing [math] (1997) Summary search -- speed (1997) [shell] (2002) [WebDNA] WebDNA Sciprt for Zipping files? (2012) strange [date] behavior (2001) DreamWeaver Extensions (2000) Request for page test (2003) ShowNext for method=POST (1997) [ShowCart] and GET vs. POST (1997) Quit revisited (1997) Processing all html files through WebCat or Typhoon (1998) Here we go again... was: DDEConnect not working (2006) WebMerchant when CC network is down (1998) TaxTotal Problem (1997) webdelivery.html and webna (1997) Bug? (1997) [OT] Security in general [Was] WebDNA security (2004) Jimmy (1998)