Hmm ... ok. Haven't thought of leading zeros.
Give it another try then:
PHP Code:
// PostSizeHack
// Make sure user does not user too large fonts
$pattern = "/\[size=0*[6-9]\].*\[\/size\]/si"; // Check for SIZE=[0]6-9
$pattern2 = "/\[size=\+0*[5-9]\].*\[\/size\]/si"; // Check for SIZE=+[0]5-9
$pattern3 = "/\[size=\+*0*[1-9][0-9]+\].*\[\/size\]/si"; // Check for SIZE=[+][0]10-xxxxx
if (preg_match($pattern, $post['message']) or
preg_match($pattern2, $post['message']) or
preg_match($pattern3, $post['message'])) {
$post['preview'] = 1;
eval('$errors[] = "Font size too large - max is 5";');
}
// PostSizeHack