I know that if $f$ is a Lebesgue measurable function on $[a,b]$ then there exists a continuous function $g$ such that $|f(x)-g(x)|< \epsilon$ for all $x\in [a,b]\setminus P$ where the measure of $P$ is less than $\epsilon$.
This seems to imply that every Lebesgue measurable function on $\mathbb{R}$ is the pointwise limit of continuous functions. Is this correct?
I thought of a worse example. A pointwise limit of a sequence of continuous functions is Borel measurable, and there are Lebesgue measurable functions that are not Borel measurable. The characteristic function of any non-Borel set of measure $0$ will do, for example.
The problem with "this seems to imply" is that "almost everywhere" and "everywhere" are different.