$re = '/Client=(\w+[ \w+]*);?/m';
$str = 'Client=EBA;Action=OneNotePagePreviewsRealtimeProcessor
Client=EBssssA;Action=OneNotePagePreviewsRealtimeProcessor
Client=some other;Action=OneNotePagePreviewsRealtimeProcessor
Client=some other word long;Action=OneNotePagePreviewsRealtimeProcessor
Client=OWA;Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; InfoPath.2; SLCC2; Media Center PC 6.0);
Client=Hub Transport
Client=OWA;Mozilla/5.0 (Linux; Android 10; Redmi Note 8T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.91 Mobile Safari/537.36;
Client=WebServices;macOS/11.2.2 (20D80) CalendarAgent/954;
Client=OutlookService;microsoft.windowscommunicationsapps;';
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