AltME: Parse


Works in both, R2 and R3.
But for this particular use, Rebol 3 now has a _much_ better tool: SPLIT.
I learned something already. :-)

it works in R2. as even
>> parse "a b c" {,}
== ["a" "b" "c"]
breaks at white spaces
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"]
Just at what I wanted to point

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

Your opinion is welcome: COMMENT in PARSE
Related CureCode issue for COMMENT in PARSE:
Opinion posted.

Hi Folks, I'm having problem to parse the '&' commercial symbol. I'm using web-to-plain.r from, 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 '&'

Rondon, so, the company names are always sandwiched between two other characters -is that correct?  Are the html entities always characterized by a different matching pattern (not sandwiched the same way)?
We have a company/restaurant in Holland that is called Keuk& (translation Kitchen). Otoh the amp is not allowed in urls is it?
An idea might be to hardcode these few examples and transform them in an extra parse step, or just before returning the value from the db.
(forget the remark about url and &).
yes.. Nick
I will have to scan all the "&" and compare this with html entities (&, ´) if those two words between '&', I have to keep those words and replace '&' with "&".
I was trying to make a patch to web-to-plain.r from

Last message posted 149 weeks ago.