preg_replace

preg_replace -- Perform a regular expression search and replace

Description

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

Opmerking : When working with a replacement pattern where a backreference is immediately followed by another number ( i.e. : placing a literal number immediately after a matched pattern) , you cannot use the familiar \\1 notation for your backreference . \\11 , for example , would confuse preg_replace( ) since it does not know whether you want the \\1 backreference followed by a literal 1 , or the \\11 backreference followed by nothing .

Voorbeeld 1 .






Opmerking :

Voorbeeld 2 .






Voorbeeld 3 .




This example will produce:



Voorbeeld 4 .




Voorbeeld 5 .










Opmerking :