President Trump said there is still a chance to repeal and replace Obamacare, even after Sen. John McCain, R-Ariz., announced he would not support a measure to overhaul the Affordable Care Act.

"That was a totally unexpected thing. Terrible. Honestly, terrible," Trump said in response to McCain's decision. "Repeal and replace. Because John McCain, you look at his campaign, his last campaign was all about repeal and replace, repeal and replace. So he decided to do something different, and that's fine."

"And I say we still have a chance," he added. "We're going to do it eventually. We're going to do it eventually."

The "Graham-Cassidy bill," an amendment authored by Sens. Lindsey Graham, R-S.C., and Bill Cassidy, R-La., which would overhaul the Affordable Care Act and remove individual and employer mandates required by former President Barack Obama's signature healthcare law.

A vote on the legislation is expected next week. The Senate has until Sept. 30 to use the reconciliation tool that only requires 51 votes to repeal parts of Obamacare.