There is another version of "removeMessages" that takes a filter string as input. Just use that version.
Thank you for your quick response.
Could you provide an example? I'm not sure what you mean.
What would you use in the script instead of removeMessages '' to include a filter?