« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 1 of about 1 for textbody (0.000 sec.)
preg_quote — 正規表現文字をクオートする | PHP 8.3 9414
preg_quote (PHP 4, PHP 5, PHP 7, PHP 8) preg_quote — 正規表現文字をクオートする 説明 function preg_quote ( string $str , ? string $delimiter = null ): string preg_quote() は、 str を引数とし、正規表現構文の特殊文字の前にバックスラッシュを挿 ... 体変換 <?php // この例では、preg_quote($word) を使って、アスタリスクが // 正規表現での特殊な意味を帯びないようにしています $textbody = "This book is *very* difficult to find." ; $word = "*very*" ; $textbody = preg_replace ( "/" . preg_quote ( $word , '/' ... ) . "/" , "<i>" . $word . "</i>" , $textbody ); ?> 注意 注意 : この関数はバイナリデータに対応しています。 参考 PCRE パターン escapeshellcmd() - シェルのメタ文字をエスケ ...
https://man.mtool.work/php/8.3/function.preg-quote.html
PREV 1 NEXT