Donald Trump could have an ally in Alan Greenspan, the former Federal Reserve Chair, when it comes to financial regulations.

Trump has vowed to ax the Dodd-Frank Act, which was created after the financial crisis to made banks pass stress tests, hold more cash and abide by a litany of new rules to prevent another crisis.

Greenspan hates it.

"I'd love to see Dodd-Frank disappear," Greenspan told CNBC Thursday morning, adding that it is a "disastrous mistake."

Greenspan's comments stand at odds with his successors, former Fed Chair Ben Bernanke and current Chair Janet Yellen, both of whom have defended the need for Dodd-Frank.

Related: President Trump: a regulation killer and creator

"I think there's some big, important parts of Dodd-Frank...that are very helpful," Bernanke told Time in 2015 after his memoir, The Courage to Act, was released.

Dodd-Frank authorized the Fed to require Wall Street banks to hold more cash on hand than they previously had to. That has pinched bank's profits margins in recent years. Legal costs have also soared for big banks since Dodd-Frank became law.

The Fed also does annual "stress tests" of the banks to simulate whether the bank was strong enough financially to withstand another financial crisis.

All that regulation has triggered huge backlash from Wall Street and Republicans, including Trump.

In May, Trump told Reuters his regulation policy would be "close to dismantling Dodd-Frank."