How is a diode used to regulate voltage?
simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. (a) The basic voltage follower. (b) Still a voltage follower. (c) The modified follower.


(a) Vout = VR1. It's just a voltage follower.
(b) Vout = VR3. It's still just a voltage follower but with the added work of fighting whatever VIN and R4 are providing.
(c) If  VIN &leq; VR5 then the op-amp output will swing high and D1 will be reverse biased. The op-amp will have no affect on VOUT.

If  VIN > VR5 then the op-amp output will start to swing low until the inverting input is equal to the non-inverting input. The effect is that OA3's output will settle at 0.7 V or so below VR5 and VOUT = VR5.


Andy has made some good suggestions on diode selection.