Automatically Put New Tab into Existing Group Via URL Matching

I very much enjoy using tab groups. It’s not as “pretty” as Chrome’s implementation, but I don’t mind. However, I would like the grouping to be smarter. For example, how about have a way to automatically put a new tab into an existing group via substring or regular expression matching on the URL?

I would find that tremendously helpful.

Regards,