reduce indexterm macros to one regexp & simplify it