Php regular expression replacement function ereg_replace. The example below the php regular expression replacement function ereg_replace is to use the php regular expression replacement function ereg_replace to replace the specified character with the desired character instance. In the php Tutorial, the regular expression replacement function php regular expression replacement function ereg_replace uses the php regular expression replacement function ereg_replace to replace the specified character with the desired character instance.
Php Tutorial regular expression replacement function ereg_replace
The following example uses the php regular expression replacement function ereg_replace to replace the specified character with the desired character.
*/
$ Num = 'www .bkjia.com ';
$ String = "this string has four words.
";
$ String = ereg_replace ('Four ', $ num, $ string );
Echo $ string;
$ Num = '49 ';
$ String = "this string has four words ";
$ String = ereg_replace ('Four ', $ num, $ string );
Echo $ string;
$ String = "test text ";
Echo "*********** $ string **********
";
$ String = ereg_replace ("^ ","
", $ String );
$ String = ereg_replace ("$ ","
", $ String );
Echo "===========$ string =========== ";
The example below the http://www.bkjia.com/PHPjc/445434.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/445434.htmlTechArticlephp regular expression replacement function ereg_replace is to use the php regular expression replacement function ereg_replace to replace the specified character with the desired character instance. Php Tutorial regular expression replacement function...