#TR {~<~<(%d)hp %dmv([ HS])%dxp~>~>} {
#VAR hp %1
#IF !%pos( S, %2) {sneak}
#IF !%pos( H, %2) {hide}
} "" "prompt"
The expression [ HS] matches any combination of " ", "H", and "S". The expression is captured by the parentheses surrounding it and stored to %2. The %pos function is used to check if H or S is not present.
Troubadour