Fix regex parsing