philip          Tue Nov 26 22:30:19 2002 EDT

  Modified files:              
    /phpdoc/en/reference/pcre/functions preg-match-all.xml 
  Log:
  Fix parameter typo: order->flags.  Added <?php ?> to examples.
  
  
Index: phpdoc/en/reference/pcre/functions/preg-match-all.xml
diff -u phpdoc/en/reference/pcre/functions/preg-match-all.xml:1.5 
phpdoc/en/reference/pcre/functions/preg-match-all.xml:1.6
--- phpdoc/en/reference/pcre/functions/preg-match-all.xml:1.5   Sat Jun 22 11:10:54 
2002
+++ phpdoc/en/reference/pcre/functions/preg-match-all.xml       Tue Nov 26 22:30:17 
+2002
@@ -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-match-all">
    <refnamediv>
@@ -19,7 +19,7 @@
      Searches <parameter>subject</parameter> for all matches to the regular
      expression given in <parameter>pattern</parameter> and puts them in
      <parameter>matches</parameter> in the order specified by
-     <parameter>order</parameter>.
+     <parameter>flags</parameter>.
     </para>
     <para>
      After the first match is found, the subsequent searches  are continued
@@ -41,11 +41,13 @@
          <informalexample>
           <programlisting role="php">
 <![CDATA[
+<?php
 preg_match_all ("|<[^>]+>(.*)</[^>]+>|U", 
     "<b>example: </b><div align=left>this is a test</div>", 
     $out, PREG_PATTERN_ORDER);
 print $out[0][0].", ".$out[0][1]."\n";
 print $out[1][0].", ".$out[1][1]."\n";
+?>
 ]]>
           </programlisting>
           <para>
@@ -73,11 +75,13 @@
          <informalexample>
           <programlisting role="php">
 <![CDATA[
+<?php
 preg_match_all ("|<[^>]+>(.*)</[^>]+>|U", 
     "<b>example: </b><div align=left>this is a test</div>", 
     $out, PREG_SET_ORDER);
 print $out[0][0].", ".$out[0][1]."\n";
 print $out[1][0].", ".$out[1][1]."\n";
+?>
 ]]>
           </programlisting>
          </informalexample>
@@ -125,8 +129,10 @@
       <title>Getting all phone numbers out of some text.</title>
       <programlisting role="php">
 <![CDATA[
+<?php
 preg_match_all ("/\(?  (\d{3})?  \)?  (?(1)  [\-\s] ) \d{3}-\d{4}/x",
                 "Call 555-1212 or 1-800-555-1212", $phones);
+?>
 ]]>
       </programlisting>
      </example>
@@ -136,6 +142,7 @@
       <title>Find matching HTML tags (greedy)</title>
       <programlisting role="php">
 <![CDATA[
+<?php
 // The \\2 is an example of backreferencing. This tells pcre that
 // it must match the second set of parentheses in the regular expression
 // itself, which would be the ([\w]+) in this case. The extra backslash is 
@@ -150,6 +157,7 @@
   echo "part 2: ".$matches[3][$i]."\n";
   echo "part 3: ".$matches[4][$i]."\n\n";
 }
+?>
 ]]>
       </programlisting>
      </example>



-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to