Also there was this:
...it might be easier to use the BASIC "word" function rather than "instr" ...
I completely agree! WORD() is one of the most useful string functions because you can pack data into readable yet still useful form without a lot of code. Here's how I'd extract RGB values from the proposed RGB string:
rgb = "r100 g200 b300"
wprint "<br>R: "
wprint val(word(rgb,2,"r"))
wprint "<br>G: "
wprint val(word(rgb,2,"g"))
wprint "<br>B: "
wprint val(word(rgb,2,"b"))
wprint "<br>"
end