cvs: phpdoc-it /reference/regex reference.xml
| From: | Andrioli Darvin | Date: | Fri, 11 Jul 2003 19:53:35 +0000 |
| Subject: | cvs: phpdoc-it /reference/regex reference.xml | ||
| Groups: | php.doc.it | ||
| Request: | Send a blank email to doc-it+get-423@lists.php.net to get a copy of this message | ||
darvina Fri Jul 11 15:53:35 2003 EDT
Modified files:
/phpdoc-it/reference/regex reference.xml
Log:
Update to En 1.8
Index: phpdoc-it/reference/regex/reference.xml
diff -u phpdoc-it/reference/regex/reference.xml:1.8 phpdoc-it/reference/regex/reference.xml:1.9
--- phpdoc-it/reference/regex/reference.xml:1.8 Mon May 5 15:46:35 2003
+++ phpdoc-it/reference/regex/reference.xml Fri Jul 11 15:53:35 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- EN-Revision: 1.7 Maintainer: darvina Status: ready -->
+<!-- EN-Revision: 1.8 Maintainer: darvina Status: ready -->
<reference id="ref.regex">
<title>Funzioni per le espressioni regolari (POSIX estesa)</title>
<titleabbrev>Regexp</titleabbrev>
@@ -7,14 +7,14 @@
<partintro>
<section id="regex.intro">
&reftitle.intro;
- <note>
+ <tip>
<para>
Il PHP, utilizzando le <link linkend="ref.pcre">funzioni PCRE</link>,
supporta anche le espressioni regolari con una sintassi compatibile con Perl.
Queste funzioni supportano riconoscimenti "pigliatutto", asserzioni, criteri
condizionali,
e diverse altre caratteristiche che non sono supportate dalla sintassi POSIX estesa.
</para>
- </note>
+ </tip>
<warning>
<para>
Queste funzioni per l'espressioni regolari non sono binary-safe. Le <link
@@ -45,6 +45,8 @@
<simpara><function>spliti</function></simpara>
</listitem>
</itemizedlist>
+ </para>
+ <para>
Tutte queste funzioni usano una espressione regolare come loro
primo argomento. Le espressioni regolari utilizzate da PHP sono di tipo
POSIX esteso così come definito in POSIX 1003.2. Per una descrizione
@@ -84,35 +86,37 @@
<title>Esempi di espressione regolare</title>
<programlisting role="php">
<![CDATA[
-ereg ("abc", $string);
+<?php
/* Restituisce vero se "abc"
viene trovata ovunque in $string. */
+ereg ("abc", $string);
-ereg ("^abc", $string);
/* Restituisce vero se "abc"
viene trovata all'inizio di $string. */
+ereg ("^abc", $string);
-ereg ("abc$", $string);
/* Restituisce vero se "abc"
viene trovata alla fine di $string. */
+ereg ("abc$", $string);
-eregi ("(ozilla.[23]|MSIE.3)", $HTTP_USER_AGENT);
/* Restituisce vero se il browser
è Netscape 2, 3 oppure MSIE 3. */
+eregi ("(ozilla.[23]|MSIE.3)", $HTTP_USER_AGENT);
-ereg ("([[:alnum:]]+) ([[:alnum:]]+) ([[:alnum:]]+)", $string,$regs);
/* Posizione tre parole separate da spazio
in $regs[1], $regs[2] e $regs[3]. */
+ereg ("([[:alnum:]]+) ([[:alnum:]]+) ([[:alnum:]]+)", $string,$regs);
-$string = ereg_replace ("^", "<br />", $string);
/* Posiziona il tag <br /> all'inizio di $string. */
-
-$string = ereg_replace ("$", "<br />", $string);
+$string = ereg_replace ("^", "<br />", $string);
+
/* Posiziona il tag <br /> alla fine di $string. */
+$string = ereg_replace ("$", "<br />", $string);
-$string = ereg_replace ("\n", "", $string);
/* Toglie ogni carattere di invio
da $string. */
+$string = ereg_replace ("\n", "", $string);
+?>
]]>
</programlisting>
</example>
@@ -129,9 +133,7 @@
</para>
</section>
</partintro>
-
-&reference.regex.functions;
-
+ &reference.regex.functions;
</reference>
<!-- Keep this comment at the end of the file
Local variables: