Re: OT: WebSTAR Modify Rules

This WebDNA talk-list message is from

2006


It keeps the original formatting.
numero = 66162
interpreted = N
texte = Thanks for this. What I seem to have got working (so far), is this. Path matches: /list/([a-z A-Z]+)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/ ([0-9]+) This only accepts the first as alpha only and the last as numeric. I then pull them out with /results.html?dept=$1.1&category= $1.2&SubCategory=$1.3&ListOrder=$1.4&ListType=$1.5&StartAt=$1.6&7= $1.7&8=$1.8&9=$1.9 Is there any advantage with ([^/]*) over (.*)? Mark. On 2 Feb 2006, at 13:15, devaulw@onebox.com wrote: > I don't know about WebSTAR, but be careful using .* > Regular expressions tend to be greedy, i.e. they will match as much > as possible. > You might instead try: > [^/]* > This will match to the next slash. Put a few in a row like this: > ([^/]*)/([^/]*)/([^/]*) > > and pull them out with $1, $2, $3 for each corresponding group. > > Bill > > > > > -----Original Message----- > From: Mark Derrick > Sent: Thu, 2 Feb 2006 11:13:11 +0000 > To: "WebDNA Talk" > Subject: OT: WebSTAR Modify Rules > > I've been using WebSTAR Modify Rules successfully for ages now, but > only with very simple rules. > I'm now trying to put together something more complex, and my > inexperience with these is now beginning to show! > > This is what I want to do. > > I want to use a URL such as: > www.domain.com/list/dept/category/subcategory/search////cartnumber > > And then through Modify Rules, pull out the various variables > stored between the /'s (also allowing for empty variables), and > reapply them to a regular WebDNA URL. > > I've tried to play around with the various /(.*)/ and $1.1, $1.2, > etc, but I think I'm just missing something! > > Thanks for any help. > > > Mark. > > > ------------------------------------------------------------- > 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 digest@talk.smithmicro.com> > 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 digest@talk.smithmicro.com> > 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: OT: WebSTAR Modify Rules ( Mark Derrick 2006)
  2. Re: OT: WebSTAR Modify Rules ( devaulw@onebox.com 2006)
  3. OT: WebSTAR Modify Rules ( Mark Derrick 2006)
Thanks for this. What I seem to have got working (so far), is this. Path matches: /list/([a-z A-Z]+)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/ ([0-9]+) This only accepts the first as alpha only and the last as numeric. I then pull them out with /results.html?dept=$1.1&category= $1.2&SubCategory=$1.3&ListOrder=$1.4&ListType=$1.5&StartAt=$1.6&7= $1.7&8=$1.8&9=$1.9 Is there any advantage with ([^/]*) over (.*)? Mark. On 2 Feb 2006, at 13:15, devaulw@onebox.com wrote: > I don't know about WebSTAR, but be careful using .* > Regular expressions tend to be greedy, i.e. they will match as much > as possible. > You might instead try: > [^/]* > This will match to the next slash. Put a few in a row like this: > ([^/]*)/([^/]*)/([^/]*) > > and pull them out with $1, $2, $3 for each corresponding group. > > Bill > > > > > -----Original Message----- > From: Mark Derrick > Sent: Thu, 2 Feb 2006 11:13:11 +0000 > To: "WebDNA Talk" > Subject: OT: WebSTAR Modify Rules > > I've been using WebSTAR Modify Rules successfully for ages now, but > only with very simple rules. > I'm now trying to put together something more complex, and my > inexperience with these is now beginning to show! > > This is what I want to do. > > I want to use a URL such as: > www.domain.com/list/dept/category/subcategory/search////cartnumber > > And then through Modify Rules, pull out the various variables > stored between the /'s (also allowing for empty variables), and > reapply them to a regular WebDNA URL. > > I've tried to play around with the various /(.*)/ and $1.1, $1.2, > etc, but I think I'm just missing something! > > Thanks for any help. > > > Mark. > > > ------------------------------------------------------------- > 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 digest@talk.smithmicro.com> > 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 digest@talk.smithmicro.com> > 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/ Mark Derrick

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:

Another question (1997) Error 11 (1996) 4.5.1 for OSX (2003) Group search - using contexts (2000) WebDNA Solutions ... sorry! (1997) taxrate - off by 1 cent (1997) Test (2003) PCS Frames (1997) Newbie problem blah blah blah (1997) Re(2): & in grep (2003) European Convention (2004) HELP!!! (1998) webcat/webmerchant docs (1997) My server admin needs help ... (2004) Re:PCS Customer submissions ? (1997) webcat2b12 CGI -- Date comparisons (1997) Sku numbers (1997) RAM variables (1997) Search (1997) company names not begin with a letter (2005)