sprite 1 sprite 30
functions-online
php

preg_replace

en
de
fr

description

Searches $subject for matches to $pattern and replaces them with $replacement.

Durchsucht die Zeichenkette $subject nach Übereinstimmungen mit $pattern und ersetzt sie mit $replacement.

Analyse $subject pour trouver l'expression rationnelle $pattern et remplace les résultats par $replacement.

declaration of preg_replace

mixed preg_replace ( mixed $pattern , mixed $replacement , mixed $subject [, int $limit ] [, int &$count ] )

test preg_replace online













comments for preg_replace

On 06. Jul 2010 11:35 niconoe wrote:

Ok, I thought like $limit was optional, you set it to -1 if NULL is post :) Happy to see that's fix for now, thanks for your great website!

On 06. Jul 2010 11:10 butzi wrote:

@niconoe: This function is working. You have to set the $limit Parameter to a proper value. As @oodavid mentioned $limit is now set to -1 by default, to avoid this problem.

On 05. Jul 2010 23:40 niconoe wrote:

don't work... I tried php.net examples and it doesn't work... too bad :(

more comments for preg_replace

There are some more comments for preg_replace(). To see them all click here.

+

Leave your comment