parse to x or end
[1/4] from: ryan::christiansen::intellisol::com at: 1-May-2001 12:29
The following syntax is incorrect. Is there any way to accomplish my
intentions?
parse/all sample [copy text to ["-" | end] (print text)]
Ryan C. Christiansen
Web Developer
Intellisol International
4733 Amber Valley Parkway
Fargo, ND 58104
701-235-3390 ext. 6671
FAX: 701-235-9940
http://www.intellisol.com
Global Leader in People Performance Software
_____________________________________
Confidentiality Notice
This message may contain privileged and confidential information. If you
think, for any reason, that this message may have been addressed to you in
error, you must not disseminate, copy or take any action in reliance on it,
and we would ask you to notify us immediately by return email to
[ryan--christiansen--intellisol--com]
[2/4] from: arolls:bigpond:au at: 2-May-2001 5:16
What are your intentions? Please give us a more specific example.
Just quickly, this works:
sample: "he l lo-"
parse/all sample [copy text [[to "-" "-"] | to end] (print text)]
I added another hyphen so it gets eaten, otherwise
[to "-"] leaves it hanging and parse won't quite finish.
Anton.
[3/4] from: fantam:mailandnews at: 2-May-2001 2:20
It is indeed incorrect because you can not use 'to on blocks. Maybe in
a future version of rebol?
[4/4] from: fsievert:uos at: 2-May-2001 9:02
On Wed, 2 May 2001, Fantam wrote:
> > The following syntax is incorrect. Is there any way to accomplish my
> > intentions?
>
> > parse/all sample [copy text to ["-" | end] (print text)]
Yes:
parse/all sample [copy text [to "-" | to end] (print text)]
CU,
Frank
Librarian comment