diff --git a/Hledger/Utils.hs b/Hledger/Utils.hs
--- a/Hledger/Utils.hs
+++ b/Hledger/Utils.hs
@@ -51,7 +51,7 @@
 import Test.HUnit
 import Text.ParserCombinators.Parsec
 import Text.Printf
-import Text.Regex
+import Text.Regex.TDFA
 import Text.RegexPR
 import Text.Show.Pretty
 -- import qualified Data.Map as Map
@@ -246,10 +246,10 @@
 
 -- regex-compat (regex-posix) functions that perform better than regexpr.
 regexMatchesRegexCompat :: String -> String -> Bool
-regexMatchesRegexCompat r = isJust . matchRegex (mkRegex r)
+regexMatchesRegexCompat = flip (=~)
 
 regexMatchesCIRegexCompat :: String -> String -> Bool
-regexMatchesCIRegexCompat r = isJust . matchRegex (mkRegexWithOpts r True False)
+regexMatchesCIRegexCompat r = match (makeRegexOpts defaultCompOpt { multiline = True, caseSensitive = False, newSyntax = True } defaultExecOpt r)
 
 -- lists
 
diff --git a/hledger-lib.cabal b/hledger-lib.cabal
--- a/hledger-lib.cabal
+++ b/hledger-lib.cabal
@@ -1,5 +1,5 @@
 name:           hledger-lib
-version: 0.22
+version: 0.22.1
 stability:      beta
 category:       Finance
 synopsis:       Core data types, parsers and utilities for the hledger accounting tool.
@@ -67,8 +67,8 @@
                  ,old-locale
                  ,old-time
                  ,parsec
-                 ,pretty-show
-                 ,regex-compat-tdfa == 0.95.*
+                 ,pretty-show >= 1.6.4
+                 ,regex-tdfa
                  ,regexpr >= 0.5.1
                  ,safe >= 0.2
                  ,split >= 0.1 && < 0.3
@@ -99,8 +99,8 @@
                , old-locale
                , old-time
                , parsec
-               , pretty-show
-               , regex-compat-tdfa
+               , pretty-show >= 1.6.4
+               , regex-tdfa
                , regexpr
                , safe
                , split
