/[pcre]/code/trunk/doc/pcrepattern.3
ViewVC logotype

Diff of /code/trunk/doc/pcrepattern.3

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1055 by chpe, Tue Oct 16 15:53:30 2012 UTC revision 1213 by ph10, Wed Nov 7 17:29:40 2012 UTC
# Line 1  Line 1 
1  .TH PCREPATTERN 3 "10 September 2012" "PCRE 8.31"  .TH PCREPATTERN 3 "07 November 2012" "PCRE 8.32"
2  .SH NAME  .SH NAME
3  PCRE - Perl-compatible regular expressions  PCRE - Perl-compatible regular expressions
4  .SH "PCRE REGULAR EXPRESSION DETAILS"  .SH "PCRE REGULAR EXPRESSION DETAILS"
# Line 120  Perl-compatible, are recognized only at Line 120  Perl-compatible, are recognized only at
120  they must be in upper case. If more than one of them is present, the last one  they must be in upper case. If more than one of them is present, the last one
121  is used.  is used.
122  .P  .P
123  The newline convention affects the interpretation of the dot metacharacter when  The newline convention affects where the circumflex and dollar assertions are
124  PCRE_DOTALL is not set, and also the behaviour of \eN. However, it does not  true. It also affects the interpretation of the dot metacharacter when
125  affect what the \eR escape sequence matches. By default, this is any Unicode  PCRE_DOTALL is not set, and the behaviour of \eN. However, it does not affect
126  newline sequence, for Perl compatibility. However, this can be changed; see the  what the \eR escape sequence matches. By default, this is any Unicode newline
127    sequence, for Perl compatibility. However, this can be changed; see the
128  description of \eR in the section entitled  description of \eR in the section entitled
129  .\" HTML <a href="#newlineseq">  .\" HTML <a href="#newlineseq">
130  .\" </a>  .\" </a>
# Line 976  regular expression. Line 977  regular expression.
977  .SH "CIRCUMFLEX AND DOLLAR"  .SH "CIRCUMFLEX AND DOLLAR"
978  .rs  .rs
979  .sp  .sp
980    The circumflex and dollar metacharacters are zero-width assertions. That is,
981    they test for a particular condition being true without consuming any
982    characters from the subject string.
983    .P
984  Outside a character class, in the default matching mode, the circumflex  Outside a character class, in the default matching mode, the circumflex
985  character is an assertion that is true only if the current matching point is  character is an assertion that is true only if the current matching point is at
986  at the start of the subject string. If the \fIstartoffset\fP argument of  the start of the subject string. If the \fIstartoffset\fP argument of
987  \fBpcre_exec()\fP is non-zero, circumflex can never match if the PCRE_MULTILINE  \fBpcre_exec()\fP is non-zero, circumflex can never match if the PCRE_MULTILINE
988  option is unset. Inside a character class, circumflex has an entirely different  option is unset. Inside a character class, circumflex has an entirely different
989  meaning  meaning
# Line 995  constrained to match only at the start o Line 1000  constrained to match only at the start o
1000  "anchored" pattern. (There are also other constructs that can cause a pattern  "anchored" pattern. (There are also other constructs that can cause a pattern
1001  to be anchored.)  to be anchored.)
1002  .P  .P
1003  A dollar character is an assertion that is true only if the current matching  The dollar character is an assertion that is true only if the current matching
1004  point is at the end of the subject string, or immediately before a newline  point is at the end of the subject string, or immediately before a newline at
1005  at the end of the string (by default). Dollar need not be the last character of  the end of the string (by default). Note, however, that it does not actually
1006  the pattern if a number of alternatives are involved, but it should be the last  match the newline. Dollar need not be the last character of the pattern if a
1007  item in any branch in which it appears. Dollar has no special meaning in a  number of alternatives are involved, but it should be the last item in any
1008  character class.  branch in which it appears. Dollar has no special meaning in a character class.
1009  .P  .P
1010  The meaning of dollar can be changed so that it matches only at the very end of  The meaning of dollar can be changed so that it matches only at the very end of
1011  the string, by setting the PCRE_DOLLAR_ENDONLY option at compile time. This  the string, by setting the PCRE_DOLLAR_ENDONLY option at compile time. This
# Line 2970  Cambridge CB2 3QH, England. Line 2975  Cambridge CB2 3QH, England.
2975  .rs  .rs
2976  .sp  .sp
2977  .nf  .nf
2978  Last updated: 10 September 2012  Last updated: 07 November 2012
2979  Copyright (c) 1997-2012 University of Cambridge.  Copyright (c) 1997-2012 University of Cambridge.
2980  .fi  .fi

Legend:
Removed from v.1055  
changed lines
  Added in v.1213

  ViewVC Help
Powered by ViewVC 1.1.5