# Extension by zero in Sobolev spaces

Let $\Omega$ be an open bounded set of $R^n$, and let $\omega$ be an open subset of $\Omega$ s.t $\overline{\omega} \subset \Omega.$

For $f\in H_0^1(\omega)$, it is known that the extension of $f$ to $\Omega$ by $0$ is an element of $H_0^1(\Omega).$

I wonder if the result remains true when we replace $H_0^1$ with $H_0^1\cap H^2$.

It does not remain true. If $\omega=B(0,1)$ and $\Omega=B(0,2)$ and $f(x)=1-|x|^2$, then $f\in H^1_0(\omega)\cap H^2(\omega)$ but the extension by zero is not in $H^2(\Omega)$.