The LM317 data sheet shows how to configure the device as both a voltage regulator and current limiter. The very low component count makes the solution very simple (and quick) to implement - a bridge rectifier, smoothing, two extra capacitors and two resistors - ta dah..... Robert's your...