function ubb2xhtml($ubb)
{
$flash=<<
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="%1$d" height="%2$d">
END;
$match = array
(
'%[url=([^s] )](.*?)[/url]%s',
'%[email=([^s]) ](.*?)[/email]%i',
'%[img width=(d ) height=(d )](.*?)[/img]%s',
'%[img=([^s] )/]%s',
'%[flash width=(d ) height=(d )](.*?)[/flash]%se',
'%[(b|i|u|strike|sup|sub)](.*?)[/1]%s',
'%[h([1-6])](.*?)[/h1]%s',
'%[hr/]%s',
'%[color=([^s] )](.*?)[/color]%s',
'%[font=([^"] )](.*?)[/font]%s',
'%[size=([^s] )](.*?)[/size]%s',
'%[align=(center|right|left)](.*?)[/align]%s',
'%[valign=(middle|top|bottom)](.*?)[/valign]%s',
/*
'%[ul](.*?)[/ul]%s',
'%[ul=(circle|disc|square)](.*?)[/ul]%s',
'%[ol](.*?)[/ol]%s',
'%[ol type=([aAiI1]) start=([a-zA-Z1-9])](.*?)[/ol]%s',
'%[li](.*?)[/li]%s',
*/
'%[table=([^s] ?)](.*?)[/table]%s',
'%[caption](.*?)[/caption]%s',
'%[tr=([^s] ?)](.*?)[/tr]%s',
'%[th](.*?)[/th]%s',
'%[td](.*?)[/td]%s',
'%[note](.*?)[/note]%s',
'%[quote=(.*?)](.*?)[/quote]%s',
'%[code](.*?)[/code]%s',
'%[ ]{2}%s', // make double-spaces truly double-spaces!
);
http://www.bkjia.com/PHPjc/631971.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/631971.htmlTechArticlefunction ubb2xhtml($ubb) { $flash=END object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version...