[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

34.8 Standard Regular Expressions Used in Editing

This section describes some variables that hold regular expressions used for certain purposes in editing:

Variable: page-delimiter
This is the regular expression describing line-beginnings that separate pages. The default value is "^\014" (i.e., "^^L" or "^\C-l"); this matches a line that starts with a formfeed character.

The following two regular expressions should not assume the match always starts at the beginning of a line; they should not use `^' to anchor the match. Most often, the paragraph commands do check for a match only at the beginning of a line, which means that `^' would be superfluous. When there is a nonzero left margin, they accept matches that start after the left margin. In that case, a `^' would be incorrect. However, a `^' is harmless in modes where a left margin is never used.

Variable: paragraph-separate
This is the regular expression for recognizing the beginning of a line that separates paragraphs. (If you change this, you may have to change paragraph-start also.) The default value is "[ \t\f]*$", which matches a line that consists entirely of spaces, tabs, and form feeds (after its left margin).

Variable: paragraph-start
This is the regular expression for recognizing the beginning of a line that starts or separates paragraphs. The default value is "[ \t\n\f]", which matches a line starting with a space, tab, newline, or form feed (after its left margin).

Variable: sentence-end
This is the regular expression describing the end of a sentence. (All paragraph boundaries also end sentences, regardless.) The default value is:

 
"[.?!][]\"')}]*\\($\\| $\\|\t\\| \\)[ \t\n]*"

This means a period, question mark or exclamation mark, followed optionally by a closing parenthetical character, followed by tabs, spaces or new lines.

For a detailed explanation of this regular expression, see 34.2.2 Complex Regexp Example.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on May 2, 2002 using texi2html