Forum Moderators: coopster
and the second
as opposed to the digits before the comma, which is what you want.
Also, if matches is provided, then it is filled with the results of search.
$matches[0]will contain the text that matched the full pattern,
$matches[1]will have the text that matched the first captured parenthesized subpattern, and so on.
Notice the placement of the parentheses now...
preg_match("/ (\d{1,2}), /", 'May 10, 2004<br>15:59', $matches);
echo $matches[1];
$matches[1]).