Fix regex bug when converting from source file to object file