  We investigate an optimal stopping problem for the expected value of a
discounted payoff on a regime-switching geometric Brownian motion under two
constraints on the possible stopping times: only at exogenous random times and
only during a specific regime. The main objectives are to show that an optimal
stopping time exists as a threshold type under some boundary conditions and to
derive expressions of the value functions and the optimal threshold. To this
end, we solve the corresponding variational inequality and show that its
solution coincides with the value functions. Some numerical results are also
introduced. Furthermore, we investigate some asymptotic behaviors.
