diff --git a/kmymoney/mymoney/mymoneypayee.cpp b/kmymoney/mymoney/mymoneypayee.cpp
index 93e12c8..02c3282 100644
--- a/kmymoney/mymoney/mymoneypayee.cpp
+++ b/kmymoney/mymoney/mymoneypayee.cpp
@@ -208,14 +208,10 @@ void MyMoneyPayee::setMatchData(payeeMatchType type, bool ignorecase, const QStr
   if (m_matchingEnabled) {
     m_usingMatchKey = (type == matchKey);
     if (m_usingMatchKey) {
-      m_matchKey = keys.join(";");
-      QRegExp exp("^;*([^;].*[^;]);*$");
-      if (exp.indexIn(m_matchKey) != -1) {
-        m_matchKey = exp.cap(1);
-      }
-      while (m_matchKey.contains(QLatin1String(";;"))) {
-        m_matchKey.replace(QLatin1String(";;"), QLatin1String(";"));
-      }
+      // any 'payee match key' string containing at least one non-space character is considered valid
+      QRegExp validKeyRegExp("[^ ]");
+      QStringList filteredKeys = keys.filter(validKeyRegExp);
+      m_matchKey = filteredKeys.join(";");
     }
   }
 }
