>> How highlighting the replacement submatches will help the user to decide >> whether to replace the current match or not? > > Whether to replace a given match is not the only thing > a user can do - not the only thing to decide/consider. > > Highlighting groups helps you see _how_ a regexp matches. > > And you can always change a regexp and search/replace > again, if it's either not matching something you want > to match or matching too many things you don't want to > match. > > It's helpful in pretty much any context where regexps > are matched against text, IMO. I think you are right. So here is a patch that implements this: