torben Wed Feb 28 16:19:18 2001 EDT
Modified files:
/phpdoc/en/functions pcre.xml
Log:
Fixed up a bit of grammar and added a note about backrefs and backslashes.
Index: phpdoc/en/functions/pcre.xml
diff -u phpdoc/en/functions/pcre.xml:1.43 phpdoc/en/functions/pcre.xml:1.44
--- phpdoc/en/functions/pcre.xml:1.43 Thu Feb 22 07:28:36 2001
+++ phpdoc/en/functions/pcre.xml Wed Feb 28 16:19:18 2001
@@ -259,9 +259,10 @@
<example>
<title>Find matching HTML tags (greedy)</title>
<programlisting role="php">
-// the \\2 is an example of backreferencing. This tells pcre that
-// it must match the 2nd set of parenthesis in the regular expression
-// itself, which would be the ([\w]+) in this case.
+// 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
+// required because the string is in double quotes.
$html = "<b>bold text</b><a href=howdy.html>click me</a>
preg_match_all ("/(<([\w]+)[^>]*>)(.*)(<\/\\2>)/", $html, $matches);
- [PHP-DOC] cvs: phpdoc /en/functions pcre.xml Andrei Zmievski
- [PHP-DOC] cvs: phpdoc /en/functions pcre.xml Damien Seguy
- [PHP-DOC] cvs: phpdoc /en/functions pcre.xml Andrei Zmievski
- [PHP-DOC] cvs: phpdoc /en/functions pcre.xml Andrei Zmievski
- [PHP-DOC] cvs: phpdoc /en/functions pcre.xml Andrei Zmievski
- [PHP-DOC] cvs: phpdoc /en/functions pcre.xml Egon Schmid
- Re: [PHP-DOC] cvs: phpdoc /en/functions pcre.xml Damien Seguy
- [PHP-DOC] cvs: phpdoc /en/functions pcre.xml Daniel Beckham
- [PHP-DOC] cvs: phpdoc /en/functions pcre.xml Torben Wilson
- [PHP-DOC] cvs: phpdoc /en/functions pcre.xml Torben Wilson
- [PHP-DOC] Representing classes in PHP doc Damien Seguy
- [PHP-DOC] cvs: phpdoc /en/functions pcre.xml Andrei Zmievski
- [PHP-DOC] cvs: phpdoc /en/functions pcre.xml Damien Seguy
- [PHP-DOC] cvs: phpdoc /en/functions pcre.xml Andrei Zmievski
- [PHP-DOC] cvs: phpdoc /en/functions pcre.xml Hojtsy Gabor
- [PHP-DOC] cvs: phpdoc /en/functions pcre.xml Gabor Hojtsy
- [PHP-DOC] cvs: phpdoc /en/functions pcre.xml jim winstead
- [PHP-DOC] cvs: phpdoc /en/functions pcre.xml Kenneth Schwartz
- [PHP-DOC] cvs: phpdoc /en/functions pcre.xml Kenneth Schwartz
