This will currently match against `##123abc xyz` is that intended? You should remove the parenthesis around the hash, and make the 2nd subpattern capturing. Then just use `$group_colour[1]` as your result.