Hi, all -- I must be having a brain fart as well as going blind because I can't find in the manual how to do this.
Given a string like #AABBCC or #112233 how do I get the 2nd-3rd 4th-5th 6th-7th position substrings so I can break out the red, green, and blue values? All of the regular expressions seem to hinge on matching a separator, and the closest thing seems to be a preg_match(".(..)(..)(..)",$color,$colors) ; $r = $colors[1] ; $g = $colors[2] ; $b = $colors[3] ; but it just seems like I should be able to return a list like ($r,$g,$b) = fn(operands,$color) ; or so. TIA & HAND :-D -- David T-G [EMAIL PROTECTED] http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
pgp00000.pgp
Description: PGP signature