andrei          Tue Jan  6 04:14:39 2004 EDT

  Modified files:              
    /phpdoc/en/reference/pcre/functions preg-grep.xml 
                                        preg-match-all.xml 
                                        preg-match.xml 
  Log:
  Document new flags, parameters.
  
  
Index: phpdoc/en/reference/pcre/functions/preg-grep.xml
diff -u phpdoc/en/reference/pcre/functions/preg-grep.xml:1.4 
phpdoc/en/reference/pcre/functions/preg-grep.xml:1.5
--- phpdoc/en/reference/pcre/functions/preg-grep.xml:1.4        Mon Dec 15 11:52:49 
2003
+++ phpdoc/en/reference/pcre/functions/preg-grep.xml    Tue Jan  6 04:14:39 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
 <!-- splitted from ./en/functions/pcre.xml, last change in rev 1.2 -->
   <refentry id="function.preg-grep">
    <refnamediv>
@@ -14,6 +14,7 @@
       <type>array</type><methodname>preg_grep</methodname>
       <methodparam><type>string</type><parameter>pattern</parameter></methodparam>
       <methodparam><type>array</type><parameter>input</parameter></methodparam>
+      <methodparam 
choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
      </methodsynopsis>
 
     <para>
@@ -21,6 +22,25 @@
      the elements of the <parameter>input</parameter> array that match
      the given <parameter>pattern</parameter>.
     </para>
+ 
+    <para>
+     <parameter>flags</parameter> can be the following flag:
+     <variablelist>
+      <varlistentry>
+       <term>PREG_GREP_INVERT</term>
+       <listitem>
+        <simpara>
+         If this flag is passed, <function>preg_grep</function> returns the
+         elements of the input array that do <emphasis>not</emphasis> match
+         the given <parameter>pattern</parameter>.
+         This flag is available since <literal>PHP</literal> 4.2.0.
+        </simpara>
+       </listitem>
+      </varlistentry>
+     </variablelist>
+     The <parameter>flags</parameter> parameter is available since
+     <literal>PHP</literal> 4.3.0.
+    </para>
 
     <para>
      Since PHP 4.0.4, the results returned by <function>preg_grep</function>
Index: phpdoc/en/reference/pcre/functions/preg-match-all.xml
diff -u phpdoc/en/reference/pcre/functions/preg-match-all.xml:1.10 
phpdoc/en/reference/pcre/functions/preg-match-all.xml:1.11
--- phpdoc/en/reference/pcre/functions/preg-match-all.xml:1.10  Fri Dec 19 10:49:44 
2003
+++ phpdoc/en/reference/pcre/functions/preg-match-all.xml       Tue Jan  6 04:14:39 
2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.10 $ -->
+<!-- $Revision: 1.11 $ -->
 <!-- splitted from ./en/functions/pcre.xml, last change in rev 1.2 -->
   <refentry id="function.preg-match-all">
    <refnamediv>
@@ -14,6 +14,7 @@
       <methodparam><type>string</type><parameter>subject</parameter></methodparam>
       <methodparam><type>array</type><parameter>matches</parameter></methodparam>
       <methodparam 
choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
+      <methodparam 
choice="opt"><type>int</type><parameter>offset</parameter></methodparam>
      </methodsynopsis>
     <para>
      Searches <parameter>subject</parameter> for all matches to the regular
@@ -111,7 +112,7 @@
        <term>PREG_OFFSET_CAPTURE</term>
        <listitem>
         <para>
-         If this flag is set, for every occurring match the appendant string
+         If this flag is passed, for every occurring match the appendant string
          offset will also be returned. Note that this changes the return
          value in an array where every element is an array consisting of the
          matched string at offset <literal>0</literal> and it's string offset
@@ -126,6 +127,17 @@
      If no order flag is given, <constant>PREG_PATTERN_ORDER</constant> is
      assumed.
     </para>
+
+    <para>
+     Normally, the search starts from the beginning of the subject string. The
+     optional parameter <parameter>offset</parameter> can be used to specify
+     the alternate place from which to start the search. It is equivalent to
+     passing <function>substr</function>($subject, $offset) to
+     <function>preg_match</function> in place of the subject string.
+     The <parameter>offset</parameter> parameter is available since
+     <literal>PHP</literal> 4.3.3.
+    </para>
+
     <para>
      Returns the number of full pattern matches (which might be zero),
      or &false; if an error occurred.
Index: phpdoc/en/reference/pcre/functions/preg-match.xml
diff -u phpdoc/en/reference/pcre/functions/preg-match.xml:1.10 
phpdoc/en/reference/pcre/functions/preg-match.xml:1.11
--- phpdoc/en/reference/pcre/functions/preg-match.xml:1.10      Fri Dec 19 10:49:44 
2003
+++ phpdoc/en/reference/pcre/functions/preg-match.xml   Tue Jan  6 04:14:39 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.10 $ -->
+<!-- $Revision: 1.11 $ -->
 <!-- splitted from ./en/functions/pcre.xml, last change in rev 1.2 -->
   <refentry id="function.preg-match">
    <refnamediv>
@@ -14,6 +14,7 @@
       <methodparam><type>string</type><parameter>subject</parameter></methodparam>
       <methodparam 
choice="opt"><type>array</type><parameter>matches</parameter></methodparam>
       <methodparam 
choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
+      <methodparam 
choice="opt"><type>int</type><parameter>offset</parameter></methodparam>
      </methodsynopsis>
     <para>
      Searches <parameter>subject</parameter> for a match to the regular
@@ -33,7 +34,7 @@
        <term>PREG_OFFSET_CAPTURE</term>
        <listitem>
         <simpara>
-         If this flag is set, for every occurring match the appendant string
+         If this flag is passed, for every occurring match the appendant string
          offset will also be returned. Note that this changes the return value
          in an array where every element is an array consisting of the matched
          string at offset <literal>0</literal> and it's string offset into
@@ -44,7 +45,17 @@
       </varlistentry>
      </variablelist>
      The <parameter>flags</parameter> parameter is available since
-     <literal>PHP</literal> 4.3.0 .
+     <literal>PHP</literal> 4.3.0.
+    </para>
+
+    <para>
+     Normally, the search starts from the beginning of the subject string. The
+     optional parameter <parameter>offset</parameter> can be used to specify
+     the alternate place from which to start the search. It is equivalent to
+     passing <function>substr</function>($subject, $offset) to
+     <function>preg_match</function> in place of the subject string.
+     The <parameter>offset</parameter> parameter is available since
+     <literal>PHP</literal> 4.3.3.
     </para>
 
     <para>

Reply via email to