It looks right to me, and this test program seems to work:
Code:
<?php
$str = "BOT report 0;" or "BOT report 0;reason";
$p1 = "/BOT report (.*);(.*)/";
if (preg_match_all($p1, $str, $out1))
{
echo "<pre>";
print_r($out1);
echo "</pre>";
}
else
echo "No match";
$str = "BOT report 0;reason";
if (preg_match_all($p1, $str, $out1))
{
echo "<pre>";
print_r($out1);
echo "</pre>";
}
else
echo "No match";
Are you sure that's exactly what's in $console['chat']? For instance, is there just one space between the words (and not tabs or anything)?