I'm trying to ensure existence of 'decent' cut-off functions for sets of low regularity. Suppose that $B$ is a Lebesgue measurable set in some $\mathbb{R}^n$. I'm wondering if there exists a cut-off function $\phi \in W^{1, \infty}(\mathbb{R}^n; [0,1])$ such that $| \{ \phi = 1\} \cap B| \geq (1-2\epsilon) |B|$ and $|\{\phi \not= 0 \} \cap B^c| \leq \epsilon$, i.e. I want $\phi$ to be equal to $1$ on a large portion of $B$ and $0$ outside of $B$, up to a set of measure $\epsilon$.
The reason I'm asking is that I'd normally see cut-offs in the setting when you have a compact subset of some open set and you want your cut-off to be $1$ on the compact and $0$ outside the open - in this case it's quite easy to do using distance functions and what not, but what about more general sets? A reference would be a perfectly good answer. I'd very much like to keep the $W^{1, \infty}$ regularity, but if that's not possible then perhaps $W^{1,p}$ might do if there's a way of ensuring $p$ large enough.
If that helps then the way I want to use that is to take two measurable sets $B_1, B_2$ and construct cut-offs $\phi_1, \phi_2$ that are equal to $1$ on large portions of the respective $B_i$'s and interacting only on a small set (i.e. $\{ \phi_1 \phi_2 \not= 0\} \cap (B_1 \cup B_2)$ should have small measure). The problem here is that I only know that $B_1 \cap B_2 = \emptyset$, they are not necessarily a positive distance apart, in which case that would be trivial.
Edit: okay, shortly after posting I've realized that I can reduce the problem to the standard compact-open setting by using regularity of the Lebesgue measure on $\mathbb{R}^n$ and that solves the problem, sorry for posting in a rush, should've thought about it a bit more. I guess the question can be closed now.