This is the verbatim text of the qregexp.h include file. It is is provided only for illustration; the copyright remains with Troll Tech
/**************************************************************************** ** $Id: qregexp.h,v 2.0 1996/09/24 10:16:13 agulbra Exp $ ** ** Definition of QRegExp class ** ** Created : 950126 ** ** Copyright (C) 1995-1996 by Troll Tech AS. All rights reserved. ** *****************************************************************************/ #ifndef QREGEXP_H #define QREGEXP_H #include "qstring.h" class QRegExp { public: QRegExp(); QRegExp( const char *, bool caseSensitive=TRUE, bool wildcard=FALSE ); QRegExp( const QRegExp & ); ~QRegExp(); QRegExp &operator=( const QRegExp & ); QRegExp &operator=( const char *pattern ); bool operator==( const QRegExp & ) const; bool operator!=( const QRegExp &r ) const { return !(this->operator==(r)); } bool isEmpty() const { return rxdata == 0; } bool isValid() const { return error == 0; } bool caseSensitive() const { return cs; } void setCaseSensitive( bool ); bool wildcard() const { return wc; } void setWildcard( bool ); const char *pattern() const { return (const char *)rxstring; } int match( const char *str, int index=0, int *len=0 ) const; protected: void compile(); char *matchstr( ushort *, char *, char * ) const; private: QString rxstring; // regular expression pattern ushort *rxdata; // compiled regexp pattern int error; // error status bool cs; // case sensitive bool wc; // wildcard }; #endif // QREGEXP_H