How do I remove part of a path?

Nonsanity form at nonsanity.com
Mon Aug 1 10:25:17 EDT 2011


set itemdel to "/"
put "" into item 4 of it

There should be no double slash then. That line removes that whole item.

 ~ Chris Innanen
 ~ Nonsanity


On Sun, Jul 31, 2011 at 10:55 PM, Michael Kann <mikekann at yahoo.com> wrote:

> Pete,
>
> I checked to see if the itemDelimiter trick left behind a "/" and found
> that it does.
>
>
> http://www.travelandworkusa.com//userfiles/Felker_Mike/robot_trans_noshadow.png
>
> -- notice the 2 forward slashes where there should be uno.
>
> Mike
>
>
> --- On Sun, 7/31/11, Pete <pete at mollysrevenge.com> wrote:
>
> From: Pete <pete at mollysrevenge.com>
> Subject: Re: How do I remove part of a path?
> To: "How to use LiveCode" <use-livecode at lists.runrev.com>
> Date: Sunday, July 31, 2011, 9:36 PM
>
> replace "/public.html" with empty in <wherever the url is>.  That's
> assuming
> it's always the same string you want to get rid of.  Alternatively:
>
> set the itemdelimiter to "/"
> replace item 4 of <wherever your url is> with empty
>
> Pete
> Molly's Revenge <http://www.mollysrevenge.com>
>
>
>
>
> On Sun, Jul 31, 2011 at 6:58 PM, Admin <admin at mfelkerco.com> wrote:
>
> >
> >
> > Hello all,
> >
> > Say I have the following path:
> >
> >
> >
> >
> http://www.travelandworkusa.com/public_html/userfiles/Felker_Mike/robot_trans_noshadow.png
> >
> >
> > How do I get rid of just /public_html ?
> >
> > Thanks.
> >
> > Mike
> >
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> >
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the Use-livecode mailing list