<?php
$strings = [
'5,422 Comments, other text here and stuff',
'2 Comments, not great!',
'4/4/2009 21 Comments',
'This one is a whopper: 1,234,567,890 Comments'
];
foreach ($strings as $string) {
echo preg_match('~\d{1,3}(?:,\d{3})*(?= Comments)~', $string, $m) ? $m[0] : 'no match';
echo "\n";
}