On Sunday 25 April 2004 01:00 pm, David T-G wrote:
> 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?
php.net/substr?
> 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
--
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php