To expand on Emerton's [answer][1]: 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][2] 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][3] (they were mentioned in the very first page) which primarily treated the vanishing of etale cohomology. [1]: https://mathoverflow.net/a/14270 [2]: https://encyclopediaofmath.org/wiki/Cohomological_dimension [3]: 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"