Date: 07/20/00
- Next message: Monte Ohrt: "[PHP-DOC] cvs: phpdoc /en/functions pcre.xml"
- Previous message: Rasmus Lerdorf: "[PHP-DOC] Re: [PHP-DEV] Conference Materials Site"
- Next in thread: Monte Ohrt: "[PHP-DOC] cvs: phpdoc /en/functions pcre.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
mohrt Thu Jul 20 10:20:20 2000 EDT
Modified files:
/phpdoc/en/functions pcre.xml
Log:
added example to preg_match() documentation
Index: phpdoc/en/functions/pcre.xml
diff -u phpdoc/en/functions/pcre.xml:1.8 phpdoc/en/functions/pcre.xml:1.9
--- phpdoc/en/functions/pcre.xml:1.8 Wed Jul 19 08:02:02 2000
+++ phpdoc/en/functions/pcre.xml Thu Jul 20 10:20:20 2000
@@ -99,6 +99,14 @@
}
</programlisting>
</example>
+ <example>
+ <title>Getting the domain name out of a URL</title>
+ <programlisting role="php">
+ preg_match("/^(.*)([^\.]+\.[^\.]+)(\/.*)?/U",
+"http://www.php.net/index.html", $matches);
+ echo "domain name is: ".$matches[2]."\n";
+ </programlisting>
+ </example>
See also <function>preg_match_all</function>,
<function>preg_replace</function>, and
<function>preg_split</function>.
- Next message: Monte Ohrt: "[PHP-DOC] cvs: phpdoc /en/functions pcre.xml"
- Previous message: Rasmus Lerdorf: "[PHP-DOC] Re: [PHP-DEV] Conference Materials Site"
- Next in thread: Monte Ohrt: "[PHP-DOC] cvs: phpdoc /en/functions pcre.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

