Class DRegEx

Inherits from:
Object
Declared in:
DRegEx.h

Class Hierarchy

    Object
      |
      +---DRegEx

Class Description

The RegEx class implements methods for using regular expressions. After compiling a regular expressing, it can be used to match and search strings.


    This class uses the Extended POSIX syntax:
     .   Match any char (incl. newline)   *         Match zero or more
     +   Match one or more                ?         Match zero or one
     {c} Match exactly c times            {min,max} Match min..max times
     |   Match alternatives               []        Match one in the list
     [^] Match any except in list         [::]      Match a class in a list
     ()  Group or subexpression
     ^   Match begin of line              $         Match end of line

    Classes: alnum, alpha, blank, cntrl, digit, graph, lower, print, punct,
             space, upper, xdigit

    Examples:
          (aab|zef)   matches aab or zef
          aa(b|z)ef   matches aabef or aazef
          [a-c]       matches a or b or c
          []de]       matches ] or d or e
          [^ad]       match any except a and b
          [[:alpha:]] matches letters (*NOTE*: use ccompile and not icompile)
          [.*]        matches . and *
Last modified:
21-Nov-2005 (DRegEx.h)

Instance Variables

private regex_t _pattern
the compiled pattern
private struct re_registers _regs
the match registers
private int _result
the result of the last match/search
private size_t _length
the length of the last string

Method Index


generated 08-Jan-2006 by ObjcDoc 3.0.0