How to extract text between <> characters (server action)

I have data coming into a server action that I am saving to a DB.

The data coming in is in this format: steve b <steve@example.com>

I need to extract only the email address between the <> characters so in this case I just want to extract steve@example.com

I know this probably has something to do with using sub string formatting but I am having trouble figuring it out. Can anyone help?

Community Page
Last updated: