Go to the previous, next section.
Following are operators that GNU defines (and POSIX doesn't)
that you can use only when Regex is compiled with the preprocessor
symbol emacs
defined.
The operators in this section require Regex to recognize the syntactic classes of characters. Regex uses a syntax table to determine this.
A syntax table is an array indexed by the characters in your character set. In the ASCII encoding, therefore, a syntax table has 256 elements.
If Regex is compiled with the preprocessor symbol emacs
defined,
then Regex expects you to define and initialize the variable
re_syntax_table
to be an Emacs syntax table. Emacs' syntax
tables are more complicated than Regex's own (see section Non-Emacs Syntax Tables). See section `Syntax' in The GNU Emacs User's Manual,
for a description of Emacs' syntax tables.
\s
class)This operator matches any character whose syntactic class is represented by a specified character. `\sclass' represents this operator where class is the character representing the syntactic class you want. For example, `w' represents the syntactic class of word-constituent characters, so `\sw' matches any word-constituent character.
\S
class)This operator is similar to the match-syntactic-class operator except that it matches any character whose syntactic class is not represented by the specified character. `\Sclass' represents this operator. For example, `w' represents the syntactic class of word-constituent characters, so `\Sw' matches any character that is not word-constituent.
Go to the previous, next section.