regex changes to tmsim to better account for multiline comments, cleaned up regex