svn: /phpdoc/de/trunk/reference/pcre/functions/ preg-filter.xml
| From: | Martin Samesch | Date: | Mon, 23 Nov 2009 11:54:07 +0000 |
| Subject: | svn: /phpdoc/de/trunk/reference/pcre/functions/ preg-filter.xml | ||
| Groups: | php.doc.de | ||
| Request: | Send a blank email to doc-de+get-3534@lists.php.net to get a copy of this message | ||
samesch Mon, 23 Nov 2009 11:54:07 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=291192
Log:
initial translation
Changed paths:
A phpdoc/de/trunk/reference/pcre/functions/preg-filter.xml
Added: phpdoc/de/trunk/reference/pcre/functions/preg-filter.xml
===================================================================
--- phpdoc/de/trunk/reference/pcre/functions/preg-filter.xml (rev 0)
+++ phpdoc/de/trunk/reference/pcre/functions/preg-filter.xml 2009-11-23 11:54:07 UTC (rev 291192)
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision:$ -->
+<!-- EN-Revision: 290682 Maintainer: samesch Status: ready -->
+<refentry xml:id="function.preg-filter" xmlns="http://docbook.org/ns/docbook">
+ <refnamediv>
+ <refname>preg_filter</refname>
+ <refpurpose>Sucht und ersetzt mit regulären Ausdrücken</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>mixed</type><methodname>preg_filter</methodname>
+
<methodparam><type>mixed</type><parameter>pattern</parameter></methodparam>
+
<methodparam><type>mixed</type><parameter>replacement</parameter></methodparam>
+
<methodparam><type>mixed</type><parameter>subject</parameter></methodparam>
+ <methodparam
choice="opt"><type>int</type><parameter>limit</parameter><initializer>-1</initializer></methodparam>
+ <methodparam choice="opt"><type>int</type><parameter
role="reference">count</parameter></methodparam>
+ </methodsynopsis>
+ <para>
+ Davon abgesehen, dass <function>preg_filter</function> nur
+ Übereinstimmungen zurückgibt, ist sie mit <function>preg_replace</function>
+ identisch. Details über die Funktionsweise dieser Funktion finden Sie in
+ der <function>preg_replace</function>-Dokumentation.
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Gibt ein <type>Array</type> zurück, falls
<parameter>subject</parameter>
+ ein <type>Array</type> ist, andernfalls eine <type>Zeichenkette</type>.
+ </para>
+ <para>
+ Falls Übereinstimmungen gefunden wurden, wird die neue Zeichenkette
+ <parameter>subject</parameter> zurückgegeben, andernfalls wird
+ <parameter>subject</parameter> unverändert zurückgegeben oder &null;, falls
+ ein Fehler auftrat.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title>
+ Beispiel zum Vergleich von <function>preg_filter</function> und
+ <function>preg_replace</function>
+ </title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$zeichenkette = array('1', 'a', '2', 'b', '3',
'A', 'B', '4');
+$suchmuster = array('/\d/', '/[a-z]/', '/[1a]/');
+$ersatz = array('A:$0', 'B:$0', 'C:$0');
+
+echo "preg_filter liefert\n";
+print_r(preg_filter($suchmuster, $ersatz, $zeichenkette));
+
+echo "preg_replace liefert\n";
+print_r(preg_replace($suchmuster, $ersatz, $zeichenkette));
+?>
+]]>
+ </programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+preg_filter liefert
+Array
+(
+ [0] => A:C:1
+ [1] => B:C:a
+ [2] => A:2
+ [3] => B:b
+ [4] => A:3
+ [7] => A:4
+)
+preg_replace liefert
+Array
+(
+ [0] => A:C:1
+ [1] => B:C:a
+ [2] => A:2
+ [3] => B:b
+ [4] => A:3
+ [5] => A
+ [6] => B
+ [7] => A:4
+)
+]]>
+ </screen>
+ </example>
+ </para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>preg_replace</function></member>
+ <member><function>preg_replace_callback</function></member>
+ <member><function>preg_match</function></member>
+ <member><function>preg_split</function></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->