summaryrefslogtreecommitdiff
path: root/include/Regex.h
blob: 9c8d46635abafcdc45ad94ae5f3b1b400115b584 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef __REGEX_H__
#define __REGEX_H__
#ifdef __cplusplus

#include <Exceptions.h>
#include <String.h>
#include <regex.h>

class Regex : public Base {
  public:
      Regex(const String &, int = REG_EXTENDED, int = 0) throw (GeneralException);
      Regex(const Regex &);
      ~Regex();
    bool Match(const String &) const;
  private:
    regex_t preg;
    int cflags, eflags;
    char * pattern;
};

extern Regex empty, any;

#else
#error This only works with a C++ compiler
#endif
#endif