I'm trying to replace a color in css file using preg_replace. First i have tried to replace part of pattern using $1 and $3, but it didn't work. Next i have extracted the pattern into $matches array, replaced one of them and combined them as new replace string. It worked as expected. I think there is difference how parts of pattern defined by () are matched by preg_match->$matches_array and preg_replace->$1,$2,$3...
I know my explanation of the problem is not good at all so i'm attaching very simple php file (zipped) that show the error.
Can someone help me understand what i'm doing wrong?
[attachment deleted by admin]