Peter Carlsson wrote:
> I have tried to parse a string using the following command:
> link-parts: parse link [ "/" | ":" | none ]
> where link is a string.
> How do I split a string in parts with a rule of different identifiers?
You could try this:
>> link: http://members.xoom.com/AndrewMartin/
== http://members.xoom.com/AndrewMartin/
>> link: to string! link
== "http://members.xoom.com/AndrewMartin/"
>> replace/all link ":" " "
== "http file://members.xoom.com/AndrewMartin/"
>> replace/all link "/" " "
== "http members.xoom.com AndrewMartin "
>> parse link none
== ["http" "members.xoom.com" "AndrewMartin"]
Andrew Martin
ICQ: 26227169
http://members.xoom.com/AndrewMartin/
-><-