Re: Extract my page name

This WebDNA talk-list message is from

2006


It keeps the original formatting.
numero = 66728
interpreted = N
texte = Hi Only problem with this is the domain name can change. Cheers On 4 Apr 2006, at 16:09, Gary Krockover wrote: > I'm guessing a grep to remove any instance of /www.mydomain.com/ > (doing nothing if that is not present) before moving on to the > [middle]: > > [text show=f]PREPAGENAME=[grep search=whatever pattern to remove / > www.anycharacters.com/][myURL][/grep] > > [text]PAGENAME=[Middle StartAfter=/&EndBefore=.][PREPAGENAME][/ > middle][/text] > > Sorry, my grep-fu is weak so I can't help you there. There may be > a way to use only grep as well - I'm sure that there is, so this > has been a pretty unhelpful suggestion but I'm ready for anything > besides the "SQL or not to SQL" posts. :) > > G. > > At 09:53 AM 4/4/2006, you wrote: >> Hi >> >> Sorry I'm sure this is simple my brain has just stopped functioning >> at the moment. >> >> I have a database with various urls in it that could be stored as >> '/ mypage.html' or they could be '/www.mydomain.com/mypage.html' >> >> In either case I need a way to extract the mypage bit that will work >> with any variation of that and I can't figure out how to do it. Does >> anyone have any suggestions, I have always used... >> >> [text]PAGENAME=[Middle StartAfter=/&EndBefore=.][myURL][/middle][/ >> text] >> >> ...which used to work fine until the domains part was also >> introduced. Unfortunately I have little or no control over the >> entered url so I need to figure out a way. >> >> Any help much appreciated. > > > ------------------------------------------------------------- > 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/ ======================================== Steve Craig - Asylum Interactive Ltd Tel +44 1330 860550 Fax +44 1330 860880 ======================================== http://www.asylumweb.com Email: steve@asylumweb.com Skype: s.craig - iChat: steve.craig ======================================== ------------------------------------------------------------- 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: Extract my page name ( devaulw@onebox.com 2006)
  2. Re: Extract my page name ( Gary Krockover 2006)
  3. Re: Extract my page name ( nitai@computeroil.com 2006)
  4. Re: Extract my page name ( Steve Craig 2006)
  5. Re: Extract my page name ( Gary Krockover 2006)
  6. Re: Extract my page name ( nitai@computeroil.com 2006)
  7. Extract my page name ( Steve Craig 2006)
Hi Only problem with this is the domain name can change. Cheers On 4 Apr 2006, at 16:09, Gary Krockover wrote: > I'm guessing a grep to remove any instance of /www.mydomain.com/ > (doing nothing if that is not present) before moving on to the > [middle]: > > [text show=f]PREPAGENAME=[grep search=whatever pattern to remove / > www.anycharacters.com/][myURL][/grep] > > [text]PAGENAME=[Middle StartAfter=/&EndBefore=.][PREPAGENAME][/ > middle][/text] > > Sorry, my grep-fu is weak so I can't help you there. There may be > a way to use only grep as well - I'm sure that there is, so this > has been a pretty unhelpful suggestion but I'm ready for anything > besides the "SQL or not to SQL" posts. :) > > G. > > At 09:53 AM 4/4/2006, you wrote: >> Hi >> >> Sorry I'm sure this is simple my brain has just stopped functioning >> at the moment. >> >> I have a database with various urls in it that could be stored as >> '/ mypage.html' or they could be '/www.mydomain.com/mypage.html' >> >> In either case I need a way to extract the mypage bit that will work >> with any variation of that and I can't figure out how to do it. Does >> anyone have any suggestions, I have always used... >> >> [text]PAGENAME=[Middle StartAfter=/&EndBefore=.][myURL][/middle][/ >> text] >> >> ...which used to work fine until the domains part was also >> introduced. Unfortunately I have little or no control over the >> entered url so I need to figure out a way. >> >> Any help much appreciated. > > > ------------------------------------------------------------- > 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/ ======================================== Steve Craig - Asylum Interactive Ltd Tel +44 1330 860550 Fax +44 1330 860880 ======================================== http://www.asylumweb.com Email: steve@asylumweb.com Skype: s.craig - iChat: steve.craig ======================================== ------------------------------------------------------------- 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/ Steve Craig

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:

Forms Search Questions (1997) Server crashes and triggers . . . are they linked? (2001) Triggers (2003) japanese characters (1997) Webcatalog error, Plug-in for Webstar (1996) READFILE command? (1998) Multiple cart additions (1997) New Plug-in and Type 11 errors (1997) RAM variables (1997) showif comparison begins w/ and contains (1997) Changing price for a SLU based on options (size, etc.) (1997) WebCat2b15MacPlugin - [protect] (1997) Almost a there but..bye bye NetCloak (1997) syntax question, not in online refernce (1997) What am I missing (1997) docs for WebCatalog2 (1997) [BULK] [WebDNA] [BULK] which of these tags exist in 7.0 (2011) [WebDNA] [raw] tag with [interpret] question (2010) [BoldWords] WebCat.acgib15Mac (1997) WebCat2b13MacPlugin - nested [xxx] contexts (1997)