Plug leaks with regex handling

Sponsored-by: EMC / Isilon Storage Division