Fix regex of rgb

Firefox and IE throws errors with the existing rgb regex.