History macros

I’m wondering if this kind of thing should be made possible via the plugin API (allowing plugins to manipulate history) or in the main build of the browser, but I think it should exist nonetheless.

Essentially, if a site matches (or doesn’t match?) a wildcard, it goes into history.

So say you have your history macros set as such:
*corn*
*not?safe?for?farm*
*nsff*
https://maizevideos.com*

And your history was something like:

https://www.totallynotsketchy.tk/not-safe-for-farm/kernels-ready-2-pop.webm
https://schoolwork.org/normal/innocentsite.aspx
https://7ch.net/nsff/res/4201337.html
https://www.google.com?q=corn+kernel+pics
https://www.google.com?q=linux+kernel+pics
https://maizevideos.com/crop-field-blasted-with-roundup-then-plowed

Only these sites would show in your history:

https://schoolwork.org/normal/innocentsite.aspx
https://www.google.com?q=linux+kernel+pics