IMHO the best way would be to write a plugin that would automatically replace [\s!]+$ by a single !.
[\s!]+$
!