in reply to $1

$& may be more what you're looking for. I'm not sure though. With it you should be able to remove the all-enclosing parens, and just use it. It = entire matched string. Also you might want to know about $` = everything before the matched string, and $' = everything after the matched string. Those last two add a lot of overhead though, so I wouldn't use them unless absolutely necessary.