[REBOL] Re: Parsing problem
From: gchiu:compkarori at: 14-Nov-2002 20:30
On Thu, 14 Nov 2002 22:19:07 -0400
Blackeye Silverseeker <[blackeye--subdimension--com]> wrote:
>Hello, i am new to rebol and i have a parsing problem. If
>somebody could help me, i'd be grateful.
>Here is the code :
>url: "www.asdfasdf.com:123/path/path/file.htm"
>parse/all url [ copy host [ [to ":" skip copy port to
>"/" ] | [ to "/"]] copy path to end ]
>
>> url: "www.asdfasdf.com:123/path/path/file.htm"
== "www.asdfasdf.com:123/path/path/file.htm"
>> parse/all url [ copy host to ":" skip copy port to "/" skip copy path to end ]
== true
>> host
== "www.asdfasdf.com"
>> port
== "123"
>> path
== "path/path/file.htm"
--
Graham Chiu