#!/usr/bin/env -S sed -Ef s`(|)([^<]*)`\1\2`g s`(|)([^<]*)`\1\2`g # Restrict qau tag to the author themself. s`([^<]*) (\([^)]{20}[^<]*)`\1 \2`gp # Replace for example, '(.+), ()' -> '\1' s`,?\s+<([^>]*)>\s*``g