Mailinglisten-Archive |
At 13:05 04.05.2001 +0200, Gregor Wolf wrote: >>$str =3D "Eine Seite im <b> Internet </b> www.php3.com"; >>$str =3D= preg_replace("!<b>(.+)<\/b>!","<b>".strtoupper("\\1")."</b>",$str); >> ^^^^^ ?????? >Description > >( http://www.php.net/manual/en/function.preg-replace.php ) > >mixed preg_replace (mixed pattern, mixed replacement, mixed subject [, int= =20 >limit]) > >Searches subject for matches to pattern and replaces them with=20 >replacement. If limit is specified, then only limit matches will be=20 >replaced; if limit is omitted or is -1, then all matches are replaced > > >"!<b>(.+)<\/b>!" kann ja nicht gefunden und replaced werden, versuch mal : >"<b>(.+)<\/b>" m=FCll... folgendes sollte helfen: <?php $string =3D "blabla <b>internet</b> blabla"; print= preg_replace("/(<b>.+(?=3D<\/b>)<\/b>)/es","strtoupper('\\1')",$string); ?> daniel /*-- daniel beulshausen - daniel_(at)_php4win.de using php on windows? http://www.php4win.de
php::bar PHP Wiki - Listenarchive