Fix regex parsing of statements