The subjunctive is used after certain expressions of emotion, when the speaker shows emotion about the actions of another person, as in Me alegro de que estés aquí (‘I’m glad that you’re here’). The subjunctive is also used after impersonal expressions of emotion, as in Es una lástima que no puedas acompañarnos (‘It’s a pity that you can’t come with us’).
You should recognize these expressions as some that will require the
use of the subjunctive in the subordinate clause, after the word que:
alegrarse (‘to be glad’), esperar (‘to hope’), sentir
(‘to regret’), temer (‘to be afraid’), asombrarse (‘to be
surprised’), sorprenderse (‘to surprise’), enfadarse (‘to
be angry’), enojarse (‘to be angry’), es una lástima
(‘it’s a pity’), es triste (‘it’s sad’), es escandaloso (‘it’s
scandalous’), es terrible (‘it’s terrible’), and so forth.