www.delorie.com/gnu/docs/elisp-manual-21/elisp_568.html   search  
 
Buy the book!


GNU Emacs Lisp Reference Manual

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

34.2.1.2 Character Classes

Here is a table of the classes you can use in a character alternative, in Emacs 21, and what they mean:

`[:ascii:]'
This matches any ASCII (unibyte) character.
`[:alnum:]'
This matches any letter or digit. (At present, for multibyte characters, it matches anything that has word syntax.)
`[:alpha:]'
This matches any letter. (At present, for multibyte characters, it matches anything that has word syntax.)
`[:blank:]'
This matches space and tab only.
`[:cntrl:]'
This matches any ASCII control character.
`[:digit:]'
This matches `0' through `9'. Thus, `[-+[:digit:]]' matches any digit, as well as `+' and `-'.
`[:graph:]'
This matches graphic characters--everything except ASCII control characters, space, and the delete character.
`[:lower:]'
This matches any lower-case letter, as determined by the current case table (see section 4.9 The Case Table).
`[:nonascii:]'
This matches any non-ASCII (multibyte) character.
`[:print:]'
This matches printing characters--everything except ASCII control characters and the delete character.
`[:punct:]'
This matches any punctuation character. (At present, for multibyte characters, it matches anything that has non-word syntax.)
`[:space:]'
This matches any character that has whitespace syntax (see section 35.2.1 Table of Syntax Classes).
`[:upper:]'
This matches any upper-case letter, as determined by the current case table (see section 4.9 The Case Table).
`[:word:]'
This matches any character that has word syntax (see section 35.2.1 Table of Syntax Classes).
`[:xdigit:]'
This matches the hexadecimal digits: `0' through `9', `a' through `f' and `A' through `F'.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003