Php regular expression replacement and regular expression replacement functions. Php regular expression replacement and regular expression replacement functions * below we want to replace the specified regular expression with a different content, in this case, we will use the regular expression replacement function preg_repla php regular expression replacement and regular expression replacement function/* below we want to replace the specified regular expression with another content, in this case, we will use the regular expression replacement function preg_replace. the following example is:
Php Tutorial regular expression replacement and regular expression replacement functions
/*
In the following example, we want to replace the specified regular expression with another content. in this case, we will use the regular expression replacement function preg_replace. the following example is:
The text has the following labels:
/Images/styleno.jpg "width =" 30 "height =" 30 "/>
/Images/styleno.jpg "width =" 30 "height =" 30 "/>
I want to replace them with regular expressions
Replace a style with/images/styleno.jpg "width =" 30 "height =" 30 "/>
Replace the style with/images/styleno.jpg "width =" 30 "height =" 30 "/>
*/
$ Content1 = '/images/styleno.jpg "width =" 30 "height =" 30 "/> ';
$ Content = '';
$ A = '/images/styleno.jpg "width =" 30 "height =" 30 "/> ';
Echo preg_replace ('// I', $ a, $ content );
$ Content1 = '';
$ B = '/images/styleno.jpg "width =" 30 "height =" 30 "/> ';
Echo preg_replace ('// I', $ B, $ content1 );
Http://www.bkjia.com/PHPjc/631360.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/631360.htmlTechArticlephp regular expression replacement and regular expression replacement function/* below we want to replace the specified regular expression with another content, in this case, we will use the regular expression replacement function preg_repla...