--- code/trunk/doc/pcrecompat.3 2007/02/24 21:41:42 93 +++ code/trunk/doc/pcrecompat.3 2007/08/09 09:52:43 211 @@ -6,8 +6,8 @@ .sp This document describes the differences in the ways that PCRE and Perl handle regular expressions. The differences described here are mainly with respect to -Perl 5.8, though PCRE version 7.0 contains some features that are expected to -be in the forthcoming Perl 5.10. +Perl 5.8, though PCRE versions 7.0 and later contain some features that are +expected to be in the forthcoming Perl 5.10. .P 1. PCRE has only a subset of Perl's UTF-8 and Unicode support. Details of what it does have are given in the @@ -81,7 +81,12 @@ strings when part of a pattern is repeated. For example, matching "aba" against the pattern /^(a(b)?)+$/ in Perl leaves $2 unset, but in PCRE it is set to "b". .P -11. PCRE provides some extensions to the Perl regular expression facilities. +11. PCRE does support Perl 5.10's backtracking verbs (*ACCEPT), (*FAIL), (*F), +(*COMMIT), (*PRUNE), (*SKIP), and (*THEN), but only in the forms without an +argument. PCRE does not support (*MARK). If (*ACCEPT) is within capturing +parentheses, PCRE does not set that capture group; this is different to Perl. +.P +12. PCRE provides some extensions to the Perl regular expression facilities. Perl 5.10 will include new features that are not in earlier versions, some of which (such as named parentheses) have been in PCRE for some time. This list is with respect to Perl 5.10: @@ -94,8 +99,8 @@ meta-character matches only at the very end of the string. .sp (c) If PCRE_EXTRA is set, a backslash followed by a letter with no special -meaning is faulted. Otherwise, like Perl, the backslash is ignored. (Perl can -be made to issue a warning.) +meaning is faulted. Otherwise, like Perl, the backslash is quietly ignored. +(Perl can be made to issue a warning.) .sp (d) If PCRE_UNGREEDY is set, the greediness of the repetition quantifiers is inverted, that is, by default they are not greedy, but if followed by a @@ -116,8 +121,22 @@ .sp (j) The alternative matching function (\fBpcre_dfa_exec()\fP) matches in a different way and is not Perl-compatible. -.P -.in 0 -Last updated: 28 November 2006 -.br -Copyright (c) 1997-2006 University of Cambridge. +. +. +.SH AUTHOR +.rs +.sp +.nf +Philip Hazel +University Computing Service +Cambridge CB2 3QH, England. +.fi +. +. +.SH REVISION +.rs +.sp +.nf +Last updated: 08 August 2007 +Copyright (c) 1997-2007 University of Cambridge. +.fi