Refined stop

Added in extra ways to filter the events to be stopped, including a
regex for matching and general function.