Rational map of curves extends to a morphism if $C$ regular

A way to prove it is via the valuative criterion for properness.

Assume that $C$ is a regular irreducible curve, $C'$ is proper over $k$ and let $U$ be the maximal dense open subset of $C$ such that $f$ is defined over $U$, say by a morphism $g:U\rightarrow C'$. Let $P\in C-U$ be a closed point: regularness at $P$ implies that $\mathscr{O}_{C,P}$ is a DVR. Then, the valuative criterion of properness gives a morphism $h:\mathrm{Spec}(\mathscr{O}_{C,P})\rightarrow C'$ embedded in the following commutative diagram :

enter image description here

where the upper arrow is the composite $\mathrm{Spec}(k(C))\rightarrow U\xrightarrow{g} C'$, the lower one is given by the inclusion $k\rightarrow\mathscr{O}_{C,P}$ and the left one is given by the inclusion $\mathscr{O}_{C,P}\rightarrow k(C)$.

Then, one may extend $h$ to a morphism $l:V\rightarrow C'$ on an open neighbourhood $V$ of $P$. Since $l$ and $g$ are generically equal, one concludes that $g$ and $l$ represent the same rational map, so that $P\in V\subseteq U$. This proves that $U=C$.

Note that one doesn't need $C'$ to be a curve and the properness condition on $C$ is unnecessary. Besides, the irreducibility assumption on $C$ is also unnecessary : using that $C$ is smooth, one may write it as a disjoint union of its irreducible components and the previous argument works on each irreducible component.