fixed bad definition of preg_quote.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@28622 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Brian Moon 2000-07-19 15:02:02 +00:00
parent b57996e30f
commit a22938b130

View file

@ -388,6 +388,7 @@ $keywords = preg_split ("/[\s,]+/", "hypertext language, programming");
<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>
@ -397,10 +398,25 @@ $keywords = preg_split ("/[\s,]+/", "hypertext language, programming");
run-time string that you need to match in some text and the
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>