I have no idea how to make a regex , that's why i am asking this question.I have one string like chirag patel <[email protected]>
I have a regex to get email id from the string.
preg_match("/\<(.*)\>/", $data['From'], $matches);
$email = $matches[1];
How to get name from above string using regex?
my expected output is: chirag patel.
$name = strtok($data['From'], '<');