hi, i need to trim html text by using regex.but i could not. i need your help "<B>bla1</B> <B>bla2</B> bla3 " ....... how do edit this htm text ? i need change it as "bla1 bla2 bla3" thanks
Hi, try this : $s="<B>bla1</B> <B>bla2</B> bla3 "; echo str_ireplace(array('<b>','</b>'),'',$s); PHP:
OK, please try the following : $s="<B>bla1</B> <B>bla2</B> bla3 "; echo preg_replace('#(\<b\>)(.*?)(\</b\>)#mi','$2',$s); PHP: