diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
 # Revision history for auto-extract
 
+## 0.1.0.1 -- 2026-02-03
+
+* Fixed a bug that resulted in needing whitespace before the '('.
+
 ## 0.1.0.0 -- YYYY-mm-dd
 
 * First version. Released on an unsuspecting world.
diff --git a/auto-extract.cabal b/auto-extract.cabal
--- a/auto-extract.cabal
+++ b/auto-extract.cabal
@@ -1,6 +1,6 @@
 cabal-version:      3.0
 name:               auto-extract
-version:            0.1.0.0
+version:            0.1.0.1
 license:            BSD-3-Clause
 license-file:       LICENSE
 synopsis:           Extract code segment to top level function
diff --git a/src/AutoExtract.hs b/src/AutoExtract.hs
--- a/src/AutoExtract.hs
+++ b/src/AutoExtract.hs
@@ -138,10 +138,14 @@
       case BS.breakSubstring "EXTRACT@" bs of
         (before, "") -> if matchFound then Just before else Nothing
         (before, match) -> do
-          let name = BS8.takeWhile (not . Char.isSpace) $ BS.drop 8 match
+          let spaceOrParen c = Char.isSpace c || c == '('
+              name = BS8.takeWhile (not . spaceOrParen) $ BS.drop 8 match
           guard . not $ BS.null name
           let rest = BS.drop (8 + BS.length name) match
-              expr = "EXTRACT \"" <> name <> "\""
+              expr = "EXTRACT \"" <> name <> "\"" <>
+                case BS8.uncons rest of
+                  Just ('(', _) -> " " -- Add a space if no separation with the '('
+                  _ -> ""
           newRest <- update True rest
           Just $ before <> expr <> newRest
 
diff --git a/test/Main.hs b/test/Main.hs
--- a/test/Main.hs
+++ b/test/Main.hs
@@ -26,6 +26,7 @@
 #endif
     , testCase "11" $ runTest "Case11.hs"
     , testCase "12" $ runTest "Case12.hs"
+    , testCase "13" $ runTest "Case13.hs"
     ]
   ]
 
