diff --git a/src/util/regex/regex-matcher.hpp b/src/util/regex/regex-matcher.hpp
index 5916565..bb18a8f 100644
--- a/src/util/regex/regex-matcher.hpp
+++ b/src/util/regex/regex-matcher.hpp
@@ -56,7 +56,7 @@
                shared_ptr<RegexBackrefManager> backrefManager = nullptr);
 
   virtual
-  ~RegexMatcher() = default;
+  ~RegexMatcher();
 
   virtual bool
   match(const Name& name, size_t offset, size_t len);
@@ -96,56 +96,8 @@
   std::vector<name::Component> m_matchResult;
 };
 
-inline std::ostream&
-operator<<(std::ostream& os, const RegexMatcher& rm)
-{
-  return os << rm.getExpr();
-}
-
-inline
-RegexMatcher::RegexMatcher(const std::string& expr, const RegexExprType& type,
-                           shared_ptr<RegexBackrefManager> backrefManager)
-  : m_expr(expr)
-  , m_type(type)
-{
-  if (backrefManager)
-    m_backrefManager = std::move(backrefManager);
-  else
-    m_backrefManager = make_shared<RegexBackrefManager>();
-}
-
-inline bool
-RegexMatcher::match(const Name& name, size_t offset, size_t len)
-{
-  m_matchResult.clear();
-
-  if (recursiveMatch(0, name, offset, len)) {
-    for (size_t i = offset; i < offset + len; i++)
-      m_matchResult.push_back(name.get(i));
-    return true;
-  }
-
-  return false;
-}
-
-inline bool
-RegexMatcher::recursiveMatch(size_t matcherNo, const Name& name, size_t offset, size_t len)
-{
-  if (matcherNo >= m_matchers.size())
-    return len == 0;
-
-  ssize_t tried = len;
-  auto matcher = m_matchers[matcherNo];
-
-  while (tried >= 0) {
-    if (matcher->match(name, offset, tried) &&
-        recursiveMatch(matcherNo + 1, name, offset + tried, len - tried))
-      return true;
-    tried--;
-  }
-
-  return false;
-}
+std::ostream&
+operator<<(std::ostream& os, const RegexMatcher& rm);
 
 } // namespace ndn
 
