  Due to quantum confinement, excitons in finite-sized crystals behave rather
differently than in bulk materials. We investigate the dependence of energies
of Rydberg excitons on the strengths of parabolic as well as rectangular
confinement potentials in finite-sized crystals. The evolution of the energy
levels of hydrogen-like excitons in the crossover region from weak to strong
parabolic confinement is analyzed for different quantum numbers by numerical
solution of the two-dimensional Schr\"{o}dinger equation. The energy spectrum
of hydrogen-like excitons in Cu$_{2}$O-based rectangular quantum wells is, in
turn, obtained numerically from the solution of the three-dimensional
Schr\"{o}dinger equation as a function of the quantum well width. Various
crossings and avoided crossings of Rydberg energy levels are observed and
categorized based on the symmetry properties of the exciton wave function.
Particular attention is paid to the two limiting cases of narrow and wide
quantum wells attributed to strong and weak confinement, respectively. The
energies obtained with the pure Coulomb interaction are compared with the
results originating from the Rytova-Keldysh potential, i.e., by taking into
account the dielectric contrast in the quantum well and in the barrier.
