--- a/text-match.cc     2015-06-12 15:22:16 +0100
+++ b/text-match.cc     2015-06-12 15:26:19 +0100
@@ -202,6 +202,13 @@
 int
 TextMatch :: my_regexec (const StringView& text) const
 {
+  if (_pcre_state == ERR)
+  {
+    delete _pcre_info;
+    _pcre_info = 0;
+    _pcre_state = NEED_COMPILE;
+  }
+
    if (_pcre_state == NEED_COMPILE)
    {
       _pcre_info = new PcreInfo ();
