78xx is used to output positive voltage and 79xx is used to output negative voltage.
7805 and 78 15 are connected in the same way, as are 7905 and 79 15. ?
The picture is rough, but it should be understandable ~ take 7805 and 7905 as examples.
The part with power grid is rectified by voltage transformation, and then connected to 7805 or 7905 for regulated output.
If connected to Figure A, the positive voltage is output, and the measured "+"terminal is+5V;
If it is connected to Figure B, it will output a negative voltage, and the "+"terminal measures -5v.