______________________________________________________________________
Hey There,
I don't like using pipe characters for delimiters in find/replace arguments, because they are a typical character in regular expressions - and it can get confusing (to me).
I prefer to use the exclamation point. To me it's much easier to read.
#! /usr/bin/env bash
sed -e "s!.*<!!" -e "s!>.*!!"
The canonical way to write that would be:
sed -e "s/.*<//" -e "s/>.*//"
But all three are syntactically correct.
What's between the '!' and the '/' are the regex patterns.
's' for search.
s(earch)!<search-pattern>!<replace-pattern!
The given sed statement uses two find/replace actions to kill what is before "<" and what is after ">", and that's not safe unless all the input is consistent.
The text-filter I posted is fairly bomb-proof. It will find all email addresses, remove any duplicates, sort the remaining addresses, and replace the text in the front window.