How potential/voltage dividers compare to voltage regulators?

Which way is "this way"?