/[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 573 by ph10, Wed Nov 17 17:55:57 2010 UTC revision 574 by ph10, Sat Nov 20 17:47:27 2010 UTC
# Line 182  The following sections describe the use Line 182  The following sections describe the use
182  .rs  .rs
183  .sp  .sp
184  The backslash character has several uses. Firstly, if it is followed by a  The backslash character has several uses. Firstly, if it is followed by a
185  non-alphanumeric character, it takes away any special meaning that character  character that is not a number or a letter, it takes away any special meaning
186  may have. This use of backslash as an escape character applies both inside and  that character may have. This use of backslash as an escape character applies
187  outside character classes.  both inside and outside character classes.
188  .P  .P
189  For example, if you want to match a * character, you write \e* in the pattern.  For example, if you want to match a * character, you write \e* in the pattern.
190  This escaping action applies whether or not the following character would  This escaping action applies whether or not the following character would
# Line 192  otherwise be interpreted as a metacharac Line 192  otherwise be interpreted as a metacharac
192  non-alphanumeric with backslash to specify that it stands for itself. In  non-alphanumeric with backslash to specify that it stands for itself. In
193  particular, if you want to match a backslash, you write \e\e.  particular, if you want to match a backslash, you write \e\e.
194  .P  .P
195    In UTF-8 mode, only ASCII numbers and letters have any special meaning after a
196    backslash. All other characters (in particular, those whose codepoints are
197    greater than 127) are treated as literals.
198    .P
199  If a pattern is compiled with the PCRE_EXTENDED option, whitespace in the  If a pattern is compiled with the PCRE_EXTENDED option, whitespace in the
200  pattern (other than in a character class) and characters between a # outside  pattern (other than in a character class) and characters between a # outside
201  a character class and the next newline are ignored. An escaping backslash can  a character class and the next newline are ignored. An escaping backslash can
# Line 225  but when a pattern is being prepared by Line 229  but when a pattern is being prepared by
229  one of the following escape sequences than the binary character it represents:  one of the following escape sequences than the binary character it represents:
230  .sp  .sp
231    \ea        alarm, that is, the BEL character (hex 07)    \ea        alarm, that is, the BEL character (hex 07)
232    \ecx       "control-x", where x is any character    \ecx       "control-x", where x is any ASCII character
233    \ee        escape (hex 1B)    \ee        escape (hex 1B)
234    \ef        formfeed (hex 0C)    \ef        formfeed (hex 0C)
235    \en        linefeed (hex 0A)    \en        linefeed (hex 0A)
# Line 237  one of the following escape sequences th Line 241  one of the following escape sequences th
241  .sp  .sp
242  The precise effect of \ecx is as follows: if x is a lower case letter, it  The precise effect of \ecx is as follows: if x is a lower case letter, it
243  is converted to upper case. Then bit 6 of the character (hex 40) is inverted.  is converted to upper case. Then bit 6 of the character (hex 40) is inverted.
244  Thus \ecz becomes hex 1A, but \ec{ becomes hex 3B, while \ec; becomes hex  Thus \ecz becomes hex 1A (z is 7A), but \ec{ becomes hex 3B ({ is 7B), while
245  7B.  \ec; becomes hex 7B (; is 3B). If the byte following \ec has a value greater
246    than 127, a compile-time error occurs. This locks out non-ASCII characters in
247    both byte mode and UTF-8 mode. (When PCRE is compiled in EBCDIC mode, all byte
248    values are valid. A lower case letter is converted to upper case, and then the
249    0xc0 bits are flipped.)
250  .P  .P
251  After \ex, from zero to two hexadecimal digits are read (letters can be in  After \ex, from zero to two hexadecimal digits are read (letters can be in
252  upper or lower case). Any number of hexadecimal digits may appear between \ex{  upper or lower case). Any number of hexadecimal digits may appear between \ex{
# Line 2718  Cambridge CB2 3QH, England. Line 2726  Cambridge CB2 3QH, England.
2726  .rs  .rs
2727  .sp  .sp
2728  .nf  .nf
2729  Last updated: 17 November 2010  Last updated: 20 November 2010
2730  Copyright (c) 1997-2010 University of Cambridge.  Copyright (c) 1997-2010 University of Cambridge.
2731  .fi  .fi

Legend:
Removed from v.573  
changed lines
  Added in v.574

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12