Updated regex to fix parsing errors