There's a silver lining in everything.

After Walgreens Boots Alliance (WBA) announced Thursday morning that it terminated its merger with Rite Aid Corp. (RAD) amid regulatory concerns, Wall Street started to ponder the idea of e-commerce giant Amazon.com Inc. (AMZN) making a bid for the cast-aside drugstore retailer.

"I don't think Amazon will be interested [in entering the pharmacy space] in the near future," said Stefano Pessina, Walgreens Boots Alliance executive vice chairman and CEO, in response to an analyst's question on a company earnings call.

But, if he's wrong, Pessina said Walgreens would not rule out partnering with Amazon.

"I believe at the end of the day, we could find our role in the new environment," Pessina said. "Let's say I see everything as an opportunity."

Of course, Amazon is going to be plenty busy finalizing its $13.7 billion acquisition of organic grocer Whole Foods Market Inc. (WFM) , but reports have recently surfaced that the e-tailer is trying to break into the pharmacy space. Analysts have questioned whether Amazon may try to acquire Rite Aid or even Express Scripts Holding Co. (ESRX) .

Today, Walgreens said instead of merging with Rite Aid, it will buy half of Rite Aid's stores, totaling 2,186, for $5.175 billion in cash. The deal leaves Walgreens with more than 15,000 stores and Rite Aid with 2,300.

While largely overshadowed by the announcement of the new deal, Walgreens Boots Alliance did report third-quarter earnings this morning, too. The company posted earnings of $1.33 a share on revenue of $30.1 billion, beating Wall Street's estimates for earnings of $1.30 a share on revenue of $29.7 billion.

Shares Rite Aid fell 28% to $2.83 early Thursday afternoon. Walgreens' were up 0.3% to $77.35.

Walgreens Boots Alliance is a holding in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells WBA? Learn more now.

 
Read More Trending Articles:

If you liked this article you might like

Here's How to Invest Like a Billionaire

The Dow Binges on Earnings

Alphabet Slides After a So-So Quarter - 5 Things You Must Know Before the Market Opens