eregi_replace

PHP -> Funkcie -> Regulárne výrazy -> eregi_replace

Syntax

string eregi_replace ( string $pattern, string $replacement, string $string )

Popis

Príkaz jazyka PHP
eregi_replace — Replace regular expression case insensitive

This function is identical to ereg_replace except that this ignores case distinction when matching alphabetic characters.

Príklad

<?php
$pattern = '(>[^<]*)('. quotemeta($_GET['search']) .')';
$replacement = '\\1<span class="search">\\2</span>';
$body = eregi_replace($pattern, $replacement, $body);
?>


Pozri aj

ereg, eregi, ereg_replace