util: Adding regex support.
Change-Id: I33d84f4ae9076ff5a9db5232f2955f4be0ed820c
diff --git a/src/util/regex/regex-pseudo-matcher.cpp b/src/util/regex/regex-pseudo-matcher.cpp
new file mode 100644
index 0000000..abebaff
--- /dev/null
+++ b/src/util/regex/regex-pseudo-matcher.cpp
@@ -0,0 +1,30 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/**
+ * Copyright (C) 2013 Regents of the University of California.
+ * @author: Yingdi Yu <yingdi@cs.ucla.edu>
+ * See COPYING for copyright and distribution information.
+ */
+
+#include "regex-pseudo-matcher.hpp"
+
+#include "../logging.hpp"
+
+INIT_LOGGER ("RegexPseudoMatcher");
+
+using namespace std;
+
+namespace ndn
+{
+RegexPseudoMatcher::RegexPseudoMatcher()
+ :RegexMatcher ("", EXPR_PSEUDO)
+{}
+
+void
+RegexPseudoMatcher::setMatchResult(const string & str)
+{ m_matchResult.push_back(Name::Component((const uint8_t *)str.c_str(), str.size())); }
+
+void
+RegexPseudoMatcher::resetMatchResult()
+{ m_matchResult.clear(); }
+
+}//ndn