Compile re pattern