Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: some parsing

From: pwawood:gm:ail at: 24-Apr-2009 14:58

Hi Semseddin On 24 Apr 2009, at 14:19, =C5=9Eemseddin Moldibi [ Bircom ] wrote:
> Hi, why "some" includes space chars in x? > >>> parse "a b c" [copy x some ["a"] to end] > == true >>> x > == "a " > >>> parse "a b c" [copy x ["a"] to end] > == true >>> x > == "a" > >>> parse "a b c" [copy x "a" to end] > == true >>> x > == "a"
I don't know the reason that parse behaves this way, it may be a bug. =20 It seems to be something to do with the automatic whitespace handling. =20 If you use the /all refinement which lets you handle whitespaces some does what you expect.
>> parse/all "a b c" [copy x some "a" (probe x) to end]
a == true Regards Peter