[REBOL] Re: R: Re: Help on parsing
From: inetw3:mindspring at: 14-Mar-2004 3:37
Hi Giuseppe,
I don't know how you want this data returned
but to print it out you can do.......
get-k: parse/all "KW1 555 <br> KW1 333 KW2 444 <br>" "<br>"
== ["KW1 555 " "" "" "" " KW1 333 KW2 444 " "" "" ""]
get-k: replace/all mold get-k {" K} {"K} get-k: do get-k
== ["KW1 555 " "" "" "" "KW1 333 KW2 444 " "" "" ""]
foreach get-ks get-k [if find get-ks "K" [print get-ks]]
KW1 555
KW1 333 KW2 444
instead of using *if find get-ks "K" you can do
something like this.....
swich get-ks [
KW1
[if find get-ks "KW2" [do something here] ]
KW2
[some code here]
etc...
]