The Lusin's Theorem states that suppose $f$ is a measurable function on a measurable set $E$. Then for each $\epsilon$>$0$, there isa continuous function $g$ on $\mathbb{R}$ and a closed set $F$ contained in $E$ such that $f=g$ on $F$ and $m(E-F)$
My question is how to deduce the following consequence from Lusin's theorem: Suppose $f$ is integrable on $\mathbb{R}$. Then there is a continuous function $g$ satisfying $g(x)=0$ for any $x$ not contained in some interval such that $\int_{\mathbb{R}}|f-g|$<$\epsilon$.
I can see it works for a closed set $F$. But how does it work for some interval?