This looks very useful, big fan of all the ^[a-z]+q$ utilities out there. But as a user, I would probably want to use XPath[0] notation here. Maybe that is just me. A quick search revealed xidel[1] which seems to be similar, but supports XPath.
[0]https://en.wikipedia.org/wiki/XPath [1]https://github.com/benibela/xidel