If $U \subset \mathbb C^n$ is the complement of a closed analytic subset of codimension at least three then there is a result of Cartan which says that $H^1(U,\mathcal O^{analytic}\_U)=0$, see page 133 of "Theory of Stein Spaces" by Grauert and Remmert.


Does anyone know a reference for the analogous result in the algebraic category ? 



Reference for cohomology vanishing
To expand on Emerton's [answer](https://mathoverflow.net/a/14270): Using the excision sequence, Cartan's result in the algebraic case boils down to showing the following: Let $R$ be a regular local ring, and $I$ and ideal of height at least $3$, then $H^i\_I(R)=0$ for $i\leq 2$.This follows because: $$H^i\_I(R) = \lim Ext^i(R/I^n,R)$$


And $I^n$, being height $3$, always contains a regular sequence of length $2$, so the $Ext^i$ vanishes for $i\leq 2$ by standard result (see Bruns-Herzog Cohen Macaulay book, Proposition 1.2.10 for example). This argument extends to the case of codimension at least $n$ and vanishing of $H^{n-2}$.


Incidentally, a pretty non-trivial question is to find upper bound for the vanishing of local cohomology modules, in other words, the [cohomological dimension](https://encyclopediaofmath.org/wiki/Cohomological_dimension) of a subvariety $Z$. Many strong results have been obtained after SGA, by Hartshorne, Ogus, Faltings, Huneke-Lyubeznik, etc. All those references can be found in
[Lyubeznik's paper](https://www.jstor.org/stable/2946619 "Gennady Lyubeznik, Etale Cohomological Dimension and the Topology of Algebraic Varieties, Annals of Mathematics Second Series, Vol. 137, No. 1 (Jan., 1993), pp. 71–128 (58 pages), doi:10.2307/2946619. zbMATH review at https://zbmath.org/?q=an:0811.14014") (they were mentioned in the very first page) which primarily treated the vanishing of etale cohomology.


