in reply to replace all spaces within anglebrackets with underscores

This probably counts as a weird solution: s/ (?=[^<]*>)/_/g It only works for balanced, non-nested angle brackets, though. :) (Inspired by Uri Guttman.)