Backreferencing in regular expressions – sed and grep