git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@114185 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Simone Cortesi 2003-01-31 21:28:07 +00:00
parent 308e447165
commit 70add6159e

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/pcre.xml, last change in rev 1.2 -->
<refentry id="function.preg-replace">
<refnamediv>
@ -17,7 +17,7 @@
</methodsynopsis>
<para>
Searches <parameter>subject</parameter> for matches to
<parameter> pattern</parameter> and replaces them with
<parameter>pattern</parameter> and replaces them with
<parameter>replacement</parameter>. If
<parameter>limit</parameter> is specified, then only
<parameter>limit</parameter> matches will be replaced; if
@ -53,7 +53,7 @@
<programlisting role="php">
<![CDATA[
<?php
$str = "April 15, 2003";
$string = "April 15, 2003";
$pattern = "/(\w+) (\d+), (\d+)/i";
$replacement = "\${1}1,\$3";
print preg_replace($pattern, $replacement, $string);