You can see how I'm testing it and see if you can get anywhere:
PHP Code:
$msg =
'
[quote=DeanC]
adsfasd
[high] * Dean C tesats
[/high]
lala
[quote=Bob]
[high] * Dean C testss again
[/high]
[/quote]
asdfadsf
[/quote]
[high] * Dean C RAWRs
[/high]
';
$mepattern = '#[\r\n\t]+(/me[\s]{1}([^\r\n]+))#i';
preg_match_all($mepattern, $msg, $matchess);
foreach($matchess[1] AS $mekey => $mematch)
{
$pattern = str_replace(' ', '[\s]{1}', $mematch);
$pattern = str_replace('/me', '\/me', $pattern);
if(preg_match('#\[quote=(.*?)\].*' . $pattern . '.*\[\/quote]#ims', $msg, $finalmatches))
{
$user = $finalmatches[1];
}
else
{
$user = 'User';
}
$msg = str_replace($mematch, '<b>* ' . $user . ' ' . $matchess[2]["$mekey"] . '</b>', $msg);
unset($pattern, $finalmatches);
}
echo nl2br($msg);