Endoscient Posted October 13, 2003 Share Posted October 13, 2003 so i have this $input = ereg_replace('\[font="([[:graph:]]+)"\]([[:graph:]]+)\[/font\]', '<font class="\\1">\\2</font>', $input); which works fine except when there is a lind break after the . please help.... Link to comment Share on other sites More sharing options...
0 sinatosk Posted October 13, 2003 Share Posted October 13, 2003 so i have this $input = ereg_replace('\[font="([[:graph:]]+)"\]([[:graph:]]+)\[/font\]', '<font class="\\1">\\2</font>', $input); which works fine except when there is a lind break after the . please help.... try this $input = preg_replace('#\[font="([[:graph:]]+)"\]([[:graph:]]+)\[/font\]#s', '<font class="\\1">\\2</font>', $input); use preg_xxx functions instead of ereg_xxx functions because preg_xxx are faster am not fully sure what "[:graph:]" is but I never seen it in preg_xxx before Link to comment Share on other sites More sharing options...
Question
Endoscient
so i have this
which works fine except when there is a lind break after the . please help....
Link to comment
Share on other sites
1 answer to this question
Recommended Posts