AltME: Parse

Messages

PeterWood
A web-public Parse group.
GrahamC
And Peter's first message is redacted in the web mirror!
Bo
As a show of support, this is my first post to any Parse group, not just the web-public one. :-)
My favorite use of parse:  parse some-str { }
Breaks apart any string into individual words.
sqlab
this looks like Rebol3, Rebol2 uses parse some-str none, but in both cases it breaks a string in strings, not in words
Andreas
Works in both, R2 and R3.
But for this particular use, Rebol 3 now has a _much_ better tool: SPLIT.
Bo
I learned something already. :-)

sqlab
it works in R2. as even
>> parse "a b c" {,}
== ["a" "b" "c"]
breaks at white spaces
Gabriele
don't forget that PARSE str "," (or any other delimiter), in R2 at least, is meant to parse CSV lines, so it has some built in magic that may surprise you if you're not aware of it.
>> parse {a,b,c} ","
== ["a" "b" "c"]
>> parse {a,b,c d} ","
== ["a" "b" "c" "d"]
>> parse {a,b,"c d"} ","
== ["a" "b" "c d"]
>> parse {a,b,"c d,e"} ","
== ["a" "b" "c d,e"]
note also:
>> parse/all {a,b,c d} ","
== ["a" "b" "c d"]
>> parse/all {a,b,c,d} ","
== ["a" "b" "c" "d"]
>> parse/all {a,b,"c,d"} ","
== ["a" "b" "c,d"]
sqlab
Just at what I wanted to point

Geomol
Would it makes sense to let
    parse "abc" [3 char!]
be the same as
    parse "abc" [3 skip]
Geomol
Maybe letting this be true is better:
    parse "abc" [word!]
Like this is true:
    parse "123" [integer!]

DocKimbel
Your opinion is welcome: COMMENT in PARSE
https://github.com/red/red/issues/724
Andreas
Related CureCode issue for COMMENT in PARSE:
http://issue.cc/r3/1966
Gregg
Opinion posted.

Rondon
Hi Folks, I'm having problem to parse the '&' commercial symbol. I'm using web-to-plain.r from rebol.org, but the 'Inc names, I'm having problem to parse it.. any clues ?
My problem is because I have some html entities starting with &, but the problem is to find just companies such as AT&T, A&E, Film&Arts and transform this  loner '&' to '&'

Last message posted 312 weeks ago.