What are the pros and cons of an asset sale vs stock sale? And in what situation would you consider one over the other?

From what I have gathered, asset sales seem better suited for bolt ons and anything with questionable due diligence. Outside of that it seems like a stock sale provides multitudes of benefits as long as the business has had a clean history/reputation.

In hindsight do you have any regrets doing one vs the other?