Move regex out of block.