  As a variant of the famous Tur\'an problem, we study $\mathrm{rex}(n,F)$, the
maximum number of edges that an $n$-vertex regular graph can have without
containing a copy of $F$. We determine $\mathrm{rex}(n,K_{r+1})$ for all pairs
of integers $r$ and large enough $n$. For every tree $T$, we determine
$\mathrm{rex}(n,T)$ for every $n$ large enough.
