Larry asked:
> How would I parse such that
> 
> ThisIsTheLine
> 
> 
> would result in:
> 
> This Is The Line.

I know, it doesn't use 'parse, but this way was more obvious...

[
REBOL [
 ]

Line: "ThisIsTheLine"

Split: function [Line [string!]] [Result] [
 Result: make string! 0
 foreach C Line [
  if any [
   C == #"A"
   C == #"B"
   C == #"C"
   C == #"D"
   C == #"E"
   C == #"F"
   C == #"G"
   C == #"H"
   C == #"I"
   C == #"J"
   C == #"K"
   C == #"L"
   C == #"M"
   C == #"N"
   C == #"O"
   C == #"P"
   C == #"Q"
   C == #"R"
   C == #"S"
   C == #"T"
   C == #"U"
   C == #"V"
   C == #"W"
   C == #"X"
   C == #"Y"
   C == #"Z"
   ] [
   if not empty? Result [
    append Result " "
    ]
   ]
  append Result C
  ]
 Result
 ]

print Split Line

]

>> do %line.r
This Is The Line

I hope that helps!

Andrew Martin
'parse-ing it on...
ICQ: 26227169
http://members.xoom.com/AndrewMartin/
-><-

Reply via email to