i think im making things worse here is what i got:
preparse:
$a = array( '#\[url=("|\'|)(.*?)\\1\]\s*#i',
'#\[url\]\s*#i',
'#\s*\[/url\]#i',
'#\[email=("|\'|)(.*?)\\1\]\s*#i',
'#\[email\]\s*#i',
'#\s*\[/email\]#i',
'#\[img\]\s*(.*?)\s*\[/img\]#is',
'#\[colou?r=("|\'|)(.*?)\\1\](.*?)\[/colou?r\]#is',
'#\[size=\s*([0-9]*?)\s*\]\s*(.*?)\s*\[/size\]#');
$b = array( '[url=$2]',
'[url]',
'[/url]',
'[email=$2]',
'[email]',
'[/email]',
'[img]$1[/img]',
'[color=$2]$3[/color]',
'[size=$1]$2[/size]');
the rest:
$pattern = array('#\[size=([0-9]*?)\](.*?)\[/size\]#',
'#\[b\](.*?)\[/b\]#s',
'#\[i\](.*?)\[/i\]#s',
'#\[u\](.*?)\[/u\]#s',
'#\[youtube\]http://www.youtube.com/watch\?v=(.*?)\[/youtube\]#s',
'#\[googlevid\]http://video.google.com/videoplay\?docid=(.*?)\[/googlevid\]#s',
'#\[url\]([^\[]*?)\[/url\]#e',
'#\[url=([^\[]*?)\](.*?)\[/url\]#e',
'#\[email\]([^\[]*?)\[/email\]#',
'#\[email=([^\[]*?)\](.*?)\[/email\]#',
'#\[ul\](.*?)\[/ul\]#',
'#\[ol\](.*?)\[/ol\]#',
'#\[uli\](.*?)\[/uli\]#',
'#\[oli\](.*?)\[/oli\]#',
'#\[color=([a-zA-Z]*|\#?[0-9a-fA-F]{6})](.*?)\[/color\]#s',
'#\[font=(.*?)](.*?)\[/font\]#',
'#\[style="(.*?)"\](.*?)\[/style\]#',
'#\[hr /\]#',
'#\[hr\]#',
'#\[table\](.*?)\[/table\]#',
'#\[caption\](.*?)\[/caption\]#',
'#\[tr\](.*?)\[/tr\]#',
'#\[td\](.*?)\[/td\]#',
'#\[s\](.*?)\[/s\]#',
'#\[pre\](.*?)\[/pre\]#',
'#\[sup\](.*?)\[/sup\]#',
'#\[sub\](.*?)\[/sub\]#',
'#\[h\](.*?)\[/h\]#');
$replace = array('<span style="font-size: $1">$2</span>',
'<strong>$1</strong>',
'<em>$1</em>',
'<span class="bbu">$1</span>',
'object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/$1"></param><embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" width="425" height="350"></embed></object>',
'<embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=$1&hl=en"></embed>',
'handle_url_tag(\'$1\')',
'handle_url_tag(\'$1\', \'$2\')',
'<a href="mailto:$1">$1</a>',
'<a href="mailto:$1">$2</a>',
'<ul>$1</ul>',
'<ol>$1</ol>',
'<li>? $1</li>',
'<li>$1</li>',
'<span style="color: $1">$2</span>',
'<span style="font-family: $1">$2</span>',
'<div align="$1">$2</span>',
'<span style="$1">$2</span>',
'<hr />',
'<hr />',
'<table>$1</table>',
'<tr>$1</tr>',
'<td>$1</td>',
'<del>$1</del>',
'<pre>$1</pre>',
'<sup>$1</sup>',
'<sub>$1</sub>',
'<span style="background-color: #FFFF00; color: #000000">$1</span>');
i'm still not getting a parse error, but size won work using a 1-9 variable.