4

The exact equivalent would be something like:
sed -n '/email2/{s/^[^=]*=\([^=]*\).*/\1/;p;}' < file
But you'd probably want instead:
sed -n 's/^[^=]*email2[^=]*=[[:blank:]]*//p' < file
(that is match email2 only on the part before the first = and return everything on the right of the first ...