[PHP-DOC] cvs: phpdoc /en/functions pcre.xml From: brianlmoon (phpdoc <email protected>)
Date: 07/19/00

brianlmoon Wed Jul 19 08:02:02 2000 EDT

  Modified files:
    /phpdoc/en/functions pcre.xml
  Log:
  fixed bad definition of preg_quote.
  
Index: phpdoc/en/functions/pcre.xml
diff -u phpdoc/en/functions/pcre.xml:1.7 phpdoc/en/functions/pcre.xml:1.8
--- phpdoc/en/functions/pcre.xml:1.7 Sat Jul 8 06:50:19 2000
+++ phpdoc/en/functions/pcre.xml Wed Jul 19 08:02:02 2000
@@ -388,6 +388,7 @@
      <funcprototype>
       <funcdef>string <function>preg_quote</function></funcdef>
       <paramdef>string <parameter>str</parameter></paramdef>
+ <paramdef>string <parameter><optional>delimiter</optional></parameter></paramdef>
      </funcprototype>
     </funcsynopsis>
     <para>
@@ -398,8 +399,23 @@
      string may contain special regex characters.
     </para>
     <para>
+ If the optional <parameter>delimiter</parameter> is specified, it
+ will also be escaped. This is useful for escaping the delimeter
+ that is required by the PCRE functions. The / is the most commonly
+ used delimiter.</para>
+ <para>
      The special regular expression characters are:
      <screen>. \\ + * ? [ ^ ] $ ( ) { } = ! &lt; > | :</screen>
+ </para>
+ <para>
+ <example>
+ <title>Examples:</title>
+ <programlisting role="php">
+$keywords="$40 for a g3/400";
+$keywords = preg_quote ($keywords, "/");
+echo $keywords; // returns \$40 for a g3\/400
+ </programlisting>
+ </example>
     </para>
    </refsect1>
   </refentry>