Yes. But, I would add a few more components. A couple protection diodes, output capacitor and a LED.
The LED provides a power 'ON' indication and more importantly a minimum load for the regulator.

If you care to have a PCB made, it might look like this.
