High-resolution spectroscopy of transient molecules