$re = '/(?<=(?:Receive rate: ))\d+(?=(?: B\/s))/m';
$str = '9/14/2021 6:01:14 PM 42 (3224) Receive rate: 39338 B/s
9/14/2021 6:01:29 PM 92 (940) Receive rate: 215363 B/s';
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