JSFiddle - React, Tailwind, and code Playground

JavaScript

console.log("to: <username@gmail.com> from: test".replace(/<.*?\>/, 'email'))