mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Typo fixes
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@113096 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
4ee7faae08
commit
6f712fd861
1 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- splitted from ./en/functions/pcre.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.preg-replace">
|
||||
<refnamediv>
|
||||
|
@ -42,7 +42,7 @@
|
|||
notation for your backreference. <literal>\\11</literal>, for example,
|
||||
would confuse <function>preg_replace</function> since it does not know whether
|
||||
you want the <literal>\\1</literal> backreference followed by a literal <literal>1</literal>,
|
||||
or the <literal>\\11</literal> backreference followed nothing. In this case
|
||||
or the <literal>\\11</literal> backreference followed by nothing. In this case
|
||||
the solution is to use <literal>\${1}1</literal>. This creates an
|
||||
isolated <literal>$1</literal> backreference, leaving the <literal>1</literal>
|
||||
as a literal.
|
||||
|
@ -55,7 +55,7 @@
|
|||
<?php
|
||||
$str = "April 15, 2003";
|
||||
$pattern = "/(\w+) (\d+), (\d+)/i";
|
||||
$replacement = "\${1}1,\$3","April 15, 2003";
|
||||
$replacement = "\${1}1,\$3";
|
||||
print preg_replace($pattern, $replacement, $string);
|
||||
|
||||
/* Output
|
||||
|
|
Loading…
Reference in a new issue