summaryrefslogtreecommitdiff
path: root/mask.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-08-03 23:44:18 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-08-03 23:44:18 -0400
commitbcffbc96ba88bd19f5f8ac00015ff38131fd6466 (patch)
tree7f4a9646bb05f138b00cdc7127dd45cc05142cb5 /mask.h
parent8a21391d0a6d6187855b40530f25b1d8beb0d67a (diff)
downloadledger-bcffbc96ba88bd19f5f8ac00015ff38131fd6466.tar.gz
ledger-bcffbc96ba88bd19f5f8ac00015ff38131fd6466.tar.bz2
ledger-bcffbc96ba88bd19f5f8ac00015ff38131fd6466.zip
Regular expressions are working again, such that very basic register reports
are now possible.
Diffstat (limited to 'mask.h')
-rw-r--r--mask.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/mask.h b/mask.h
index 538316be..06161d12 100644
--- a/mask.h
+++ b/mask.h
@@ -41,12 +41,11 @@ class mask_t
mask_t();
public:
- bool exclude;
boost::regex expr;
explicit mask_t(const string& pattern);
- mask_t(const mask_t& m) : exclude(m.exclude), expr(m.expr) {
+ mask_t(const mask_t& m) : expr(m.expr) {
TRACE_CTOR(mask_t, "copy");
}
~mask_t() throw() {
@@ -56,7 +55,7 @@ public:
mask_t& operator=(const string& other);
bool match(const string& str) const {
- return boost::regex_match(str, expr) && ! exclude;
+ return boost::regex_search(str, expr);
}
void read(const char *& data);