svn: /phpdoc/es/trunk/reference/pcre/functions/ preg-match-all.xml preg-match.xml preg-replace.xml preg-split.xml
| From: | Pedro Antonio Gil Rodríguez | Date: | Mon, 18 Jan 2010 16:55:13 +0000 |
| Subject: | svn: /phpdoc/es/trunk/reference/pcre/functions/ preg-match-all.xml preg-match.xml preg-replace.xml preg-split.xml | ||
| Groups: | php.doc.es | ||
| Request: | Send a blank email to doc-es+get-1747@lists.php.net to get a copy of this message | ||
seros Mon, 18 Jan 2010 16:55:13 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=293702
Log:
Updated reference/pcre/*
Changed paths:
U phpdoc/es/trunk/reference/pcre/functions/preg-match-all.xml
U phpdoc/es/trunk/reference/pcre/functions/preg-match.xml
U phpdoc/es/trunk/reference/pcre/functions/preg-replace.xml
U phpdoc/es/trunk/reference/pcre/functions/preg-split.xml
Modified: phpdoc/es/trunk/reference/pcre/functions/preg-match-all.xml
===================================================================
--- phpdoc/es/trunk/reference/pcre/functions/preg-match-all.xml 2010-01-18 13:53:47 UTC (rev 293701)
+++ phpdoc/es/trunk/reference/pcre/functions/preg-match-all.xml 2010-01-18 16:55:13 UTC (rev 293702)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 290051 $ -->
-<!-- EN-Revision: 290051 Maintainer: seros Status: ready -->
+<!-- $Revision: 292248 $ -->
+<!-- EN-Revision: 292248 Maintainer: seros Status: ready -->
<refentry xml:id="function.preg-match-all" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
@@ -202,6 +202,16 @@
</thead>
<tbody>
<row>
+ <entry>5.2.2</entry>
+ <entry>
+ Los sub-patrones nominados ahora aceptan la
+ sintaxis <literal>(?<nombre>)</literal>
+ y <literal>(?'nombre')</literal> así como
+ <literal>(?P<nombre>)</literal>. Versiones anteriores
+ sólo aceptaban <literal>(?P<nombre>)</literal>.
+ </entry>
+ </row>
+ <row>
<entry>4.3.3</entry>
<entry>
Se añadió el parámetro <parameter>offset</parameter>
@@ -289,8 +299,12 @@
c: 3
FOO;
-preg_match_all('/(?<nombre>\w+): (?<dígito>\d+)/', $cadena, $coincidencias);
+preg_match_all('/(?P<nombre>\w+): (?P<dígito>\d+)/', $cadena,
$coincidencias);
+/* Esto también funciona en PHP 5.2.2 (PCRE 7.0) y posteriores, sin embargo
+ * la forma de arriba es la recomendada por compatibilidad con versiones anteriores */
+// preg_match_all('/(?<nombre>\w+): (?<dígito>\d+)/', $cadena,
$coincidencias);
+
print_r($coincidencias);
?>
Modified: phpdoc/es/trunk/reference/pcre/functions/preg-match.xml
===================================================================
--- phpdoc/es/trunk/reference/pcre/functions/preg-match.xml 2010-01-18 13:53:47 UTC (rev 293701)
+++ phpdoc/es/trunk/reference/pcre/functions/preg-match.xml 2010-01-18 16:55:13 UTC (rev 293702)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 290051 $ -->
-<!-- EN-Revision: 290051 Maintainer: seros Status: ready -->
-
+<!-- $Revision: 292248 $ -->
+<!-- EN-Revision: 292248 Maintainer: seros Status: ready -->
<refentry xml:id="function.preg-match" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>preg_match</refname>
@@ -289,11 +288,11 @@
$cadena = 'foobar: 2008';
-// Funciona en PHP 5.2.2 y posterior.
-preg_match('/(?<nombre>\w+): (?<dígito>\d+)/', $cadena, $coincidencias);
+preg_match_all('/(?P<nombre>\w+): (?P<dígito>\d+)/', $cadena,
$coincidencias);
-// Antes de PHP 5.2.2, use esto:
-// preg_match('/(?P<nombre>\w+): (?P<dígito>\d+)/', $cadena,
$coincidencias);
+/* Esto también funciona en PHP 5.2.2 (PCRE 7.0) y posteriores, sin embargo
+ * la forma de arriba es la recomendada por compatibilidad con versiones anteriores */
+// preg_match_all('/(?<nombre>\w+): (?<dígito>\d+)/', $cadena,
$coincidencias);
print_r($coincidencias);
Modified: phpdoc/es/trunk/reference/pcre/functions/preg-replace.xml
===================================================================
--- phpdoc/es/trunk/reference/pcre/functions/preg-replace.xml 2010-01-18 13:53:47 UTC (rev 293701)
+++ phpdoc/es/trunk/reference/pcre/functions/preg-replace.xml 2010-01-18 16:55:13 UTC (rev 293702)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 288721 $ -->
-<!-- EN-Revision: 288721 Maintainer: seros Status: ready -->
+<!-- $Revision: 292327 $ -->
+<!-- EN-Revision: 292327 Maintainer: seros Status: ready -->
<refentry xml:id="function.preg-replace" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>preg_replace</refname>
@@ -214,9 +214,11 @@
<![CDATA[
<?php
$cadena = 'El veloz murciélago hindú comía feliz cardillo y kiwi.';
+$patrones = array();
$patrones[0] = '/veloz/';
$patrones[1] = '/hindú/';
$patrones[2] = '/murciélago/';
+$sustituciones = array();
$sustituciones[2] = 'galápago';
$sustituciones[1] = 'africano';
$sustituciones[0] = 'lento';
Modified: phpdoc/es/trunk/reference/pcre/functions/preg-split.xml
===================================================================
--- phpdoc/es/trunk/reference/pcre/functions/preg-split.xml 2010-01-18 13:53:47 UTC (rev 293701)
+++ phpdoc/es/trunk/reference/pcre/functions/preg-split.xml 2010-01-18 16:55:13 UTC (rev 293702)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 288721 $ -->
-<!-- EN-Revision: 288721 Maintainer: seros Status: ready -->
+<!-- $Revision: 293483 $ -->
+<!-- EN-Revision: 293483 Maintainer: seros Status: ready -->
<refentry xml:id="function.preg-split" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>preg_split</refname>
@@ -58,7 +58,7 @@
<listitem>
<para>
<parameter>flags</parameter> puede ser una combinación de las siguientes
- banderas (combinadas con el operador | a nivel de bits):
+ banderas (combinadas con el operador <literal>|</literal> a nivel de bits):
<variablelist>
<varlistentry>
<term><constant>PREG_SPLIT_NO_EMPTY</constant></term>
@@ -130,12 +130,6 @@
Se añadió <constant>PREG_SPLIT_DELIM_CAPTURE</constant>
</entry>
</row>
- <row>
- <entry>4.0.0</entry>
- <entry>
- Se añadió el parámetro <parameter>flags</parameter>
- </entry>
- </row>
</tbody>
</tgroup>
</informaltable>