is-url?: parse string[ thru "://" to end]
the basic idea is:
is-url?: parse string[ copy protocol thru "://" copy where-there to end]
for specific protocols do without 'thru :
is-http:? parse string[ "http://"; to end]
eventually /all is not needed, but i always mess that up.

-Volker

Am Samstag, 4. Oktober 2003 20:40 schrieb [EMAIL PROTECTED]:
> Patrick:
> > I came to the same solution but ... load fails with some value:
>
> ...
>
> >  And I have no idea how to workaround this easily.
>
> Load is not good if the values do not translate into REBOL words or
> datatypes.  You may need to surround it with an error/try:
>
> s: "recipes/0001.html"
> loaded-s: form s
> error? try [loaded-s: load s]
>
> loaded-s is either now the original as a string, or the loaded values.
>
> Also, load can be dangerous if the string is untrusted. Try this:
>
> load "rebol [quit]"
>
> It'll exit your console.
>
> So you probably really need to use load/all.  That returns a block, so your
> original code may need to become:
>
> s: "recipes/0001.html"
> loaded-s: form s
> error? try [loaded-s: first load/all s]
>
> Sunanda.


-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

Reply via email to