You can try a custom sam(1) fork (it uses structural regex, google/ddg them): https://github.com/deadpixi/sam
sam -d for the classic cli mode.
[1] https://swtch.com/plan9port/
[1] https://swtch.com/plan9port/