Is there a way to make a plugin that matches based on a table within the plugin?

I know I can do it by using '*' to match everything and then have the script check if it matches, the problem is if it does I want to omit it from output, and it doesn't seem right to have the script catching everything then putting it back in with a ColourNote if it did not match.

I know I can also do a regex that includes all of them, but I want to be able to simply add to the table later and have it start matching that as well.
Thanks.

(Meaning it should match a table
matchtable = { "There is a chair here", "You have a pot", Why are there no flowers?" }

Hmm, two things then, will it lose other changes to the colour from other colour triggers if the plugin is replacing the text?

Also, my reason for this is I want to check for aggressive lines by specific char names, so I want to be able to easily add more types of aggro lines or edit the table of char names I am worried about, so if the plugin can save these as a table and then check from there it will be simple to add or remove.
I was thinking now of having it build triggers using AddTrigger from a table that might allow me to not have to write individual triggers for each one and build the triggers from a table, any thoughts?

That changes the variable "my_trigger_list" used in the trigger. Basically it concatenates all the strings you want to match, allowing for "magic" regexp characters appearing in the string and escaping them.

An alternative approach would be to use AddTrigger to generate the triggers from your table. Put them into a group so you can easily delete the old ones (go through the group and delete each one) and then add in the new ones based on what is in the table.