contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
Character classes
Prerequisite Concepts      

Character classes are patterns that are matched by single characters selected from a programmer-specified set.

Character classes are usually enclosed by square brackets. In their simplest form, the brackets enclose a string. The pattern matches if the next input character is any of the characters that appear in the string.

For example, the following pattern matches any of the characters representing the four usual arithmetic operators:

  ["+-*/"]

Note the significance of the brackets: while find "\par" matches a four-character string, find ["\par"] matches one of four characters.

The "%n" character is not valid when a newline sequence of two or more characters has been specified with the newline declaration. The formats "%_" and "%t" are always allowed, because they always represent a string of one character.

Prerequisite Concepts
     Pattern matching
 
   
----

Top [CONTENTS] [CONCEPTS] [SYNTAX] [LIBRARIES] [SAMPLES] [ERRORS] [INDEX]

Generated: April 21, 1999 at 2:00:46 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.