A Characterization of Regular Rings