Home > Backend Development > PHP Tutorial > PHP regular expression replacement and regular replacement function_PHP tutorial

PHP regular expression replacement and regular replacement function_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 16:59:01
Original
893 people have browsed it

php regular expression replacement and regular replacement function /* Next, we need to replace the inner space of the specified regular expression with another content. To do this, we will use the regular replacement function preg_replace. The following example is

php tutorial regular expression replacement and regular replacement function
/*
Next, we need to replace the inner space of the specified regular expression with another content. To do this, we will use the regular replacement function preg_replace. The following example is


The text has the following tag





I want to use regular expressions to replace them with
If there is style, replace it with
If there is no style, replace it with

*/

$content1 ='';
$content ='';
$a='';
echo preg_replace('//i',$a,$content);

$content1 ='';
$b='';
echo preg_replace('//i',$b,$content1);

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631360.htmlTechArticlephp regular expression replacement and regular replacement function/* Below we need to replace the inner space of the specified regular expression with Different content, to do this we will use the regular replacement function preg_repla...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template