Results of 1 - 2 of about 2 for fools (0.001 sec.)
- マルチバイト文字列にコールバック関数を用いた正規表現による置換を行う 11228
- « mb_ereg_replace mb_ereg_search » PHP Manual マルチバイト文字列 関数 マルチバイト文字列にコールバック関数を用いた正規表現による置換を行う 検索 mb_ereg_replace_callback (PHP 5 >= 5.4.1, PHP 7, PHP 8) mb_ereg_replace_callback — マルチバイト文
... ereg_replace_callback() の例 <?php // this text was used in 2002 // we want to get this up to date for 2003 $text = "April fools day is 04/01/2002\n" ; $text .= "Last christmas was 12/24/2001\n" ; // the callback function function next_year ( $matches ... } echo mb_ereg_replace_callback ( "(\d{2}/\d{2}/)(\d{4})" , "next_year" , $text ); ?> 上の例の出力は以下となります。 April fools day is 04/01/2003 Last christmas was 12/24/2002 例2 匿名関数を使用した mb_ereg_replace_callback() の例 <?php // this text ... was used in 2002 // we want to get this up to date for 2003 $text = "April fools day is 04/01/2002\n" ; $text .= "Last christmas was 12/24/2001\n" ; echo mb_ereg_replace_callback ( "(\d{2}/\d{2}/)(\d{4}) ...
-
https://man.mtool.work/php/8.3/function.mb-ereg-replace-callback.html
- マルチバイト文字列にコールバック関数を用いた正規表現による置換を行う 7485
- « mb_ereg_replace mb_ereg_search » PHP Manual マルチバイト文字列 関数 マルチバイト文字列にコールバック関数を用いた正規表現による置換を行う 検索 mb_ereg_replace_callback (PHP 5 >= 5.4.1, PHP 7, PHP 8) mb_ereg_replace_callback — マルチバイト文
... ereg_replace_callback() の例 <?php // this text was used in 2002 // we want to get this up to date for 2003 $text = "April fools day is 04/01/2002\n" ; $text .= "Last christmas was 12/24/2001\n" ; // the callback function function next_year ( $matches ... } echo mb_ereg_replace_callback ( "(\d{2}/\d{2}/)(\d{4})" , "next_year" , $text ); ?> 上の例の出力は以下となります。 April fools day is 04/01/2003 Last christmas was 12/24/2002 例2 匿名関数を使用した mb_ereg_replace_callback() の例 <?php // this text ... was used in 2002 // we want to get this up to date for 2003 $text = "April fools day is 04/01/2002\n" ; $text .= "Last christmas was 12/24/2001\n" ; echo mb_ereg_replace_callback ( "(\d{2}/\d{2}/)(\d{4}) ...
-
https://man.mtool.work/php/8.3/function.mb-ereg-replace-callback.html
PREV
1
NEXT