$re = '/(?<=my name is )[\w\s]+(?=and)/m';
$str = 'Good day, my name is Joshua Salazar and would like to inquire on the status of my order. My order number is 11-23-45. I placed my order last 04/07/2020 and would like to know what is the lead time for my order.';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php