Using $h(x)$ construct on an infinitely differentiable function $g(x)$ of the form $g(x) = 0$ for $x \leq a$ or $x \geq b$ and $g(x) = 1$ for $a' \leq x \leq b'$. Here $a < a' < b' < b$.
$h(x) = e^{-\frac{1}{x}}$, $x > 0$ and $h(x) = 0$, $x \leq 0$.
Using $h(x)$ construct on an infinitely differentiable function $g(x)$ of the form $g(x) = 0$ for $x \leq a$ or $x \geq b$ and $g(x) = 1$ for $a' \leq x \leq b'$. Here $a < a' < b' < b$.
$h(x) = e^{-\frac{1}{x}}$, $x > 0$ and $h(x) = 0$, $x \leq 0$.
It is not really clear to me what you are trying to do. Would $\exp{(\frac{a'-x}{a-x})}$ on $(a,a')$ and $\exp{(\frac{b'-x}{b-x})}$ on $(b',b)$ work?