We study the regularity of the stochastic representation of the solution of a class of initial–boundary value problems related to a regime-switching diffusion. This representation is related to the value function of a finite-horizon optimal stopping problem such as the price of an American-style option in finance. We show continuity and smoothness of the value function using coupling and time-change techniques. As an application, we find the minimal payoff scenario for the holder of an American-style option in the presence of regime-switching uncertainty under the assumption that the transition rates are known to lie within level-dependent compact sets.