diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
 Usage
 -----
 
-Cgrep 6.4.18 Usage: cgrep [OPTION] [PATTERN] files...
+Cgrep 6.4.19 Usage: cgrep [OPTION] [PATTERN] files...
 
 cgrep [OPTIONS] [ITEM]
 
diff --git a/cgrep.cabal b/cgrep.cabal
--- a/cgrep.cabal
+++ b/cgrep.cabal
@@ -1,6 +1,6 @@
 Name:                cgrep
 Description:         Cgrep: a context-aware grep for source codes
-Version:             6.4.18
+Version:             6.4.19
 Synopsis:            Command line tool
 Homepage:            http://awgn.github.io/cgrep/
 License:             GPL-2
diff --git a/src/CGrep/Strategy/Cpp/Semantic.hs b/src/CGrep/Strategy/Cpp/Semantic.hs
--- a/src/CGrep/Strategy/Cpp/Semantic.hs
+++ b/src/CGrep/Strategy/Cpp/Semantic.hs
@@ -57,12 +57,12 @@
 
     -- quick Search...
 
-        ps' = map (C.pack . (\l ->  if null l then ""
-                                              else maximumBy (compare `on` length) l) . mapMaybe (\x -> case x of
-                                    TokenCard (Cpp.TokenChar    xs _) -> Just $ unquotes $ trim xs
-                                    TokenCard (Cpp.TokenString  xs _) -> Just $ unquotes $ trim xs
-                                    TokenCard t                       -> Just $ Cpp.toString t
-                                    _                                 -> Nothing)) patterns'
+        ps' = map C.pack $ (mapMaybe (\x -> case x of
+                                            TokenCard (Cpp.TokenChar   xs _) -> Just (unquotes $ trim xs)
+                                            TokenCard (Cpp.TokenString xs _) -> Just (unquotes $ trim xs)
+                                            TokenCard t                      -> Just (Cpp.toString t)
+                                            _                                -> Nothing
+                                     ) . concat) patterns'
 
         found = quickSearch opt ps' text'
 
diff --git a/src/CGrep/Strategy/Generic/Semantic.hs b/src/CGrep/Strategy/Generic/Semantic.hs
--- a/src/CGrep/Strategy/Generic/Semantic.hs
+++ b/src/CGrep/Strategy/Generic/Semantic.hs
@@ -54,16 +54,18 @@
 
         patterns   = map (Generic.tokenizer . contextFilter (getLang opt filename) filt) ps  -- [ [t1,t2,..], [t1,t2...] ]
         patterns'  = map (map mkWildCardFromToken) patterns                                  -- [ [w1,w2,..], [w1,w2,..] ]
-        patterns'' = map (combineMultiCard . map (:[])) patterns'  -- [ [m1,m2,..], [m1,m2,..] ] == [ [ [w1], [w2],..], [[w1],[w2],..]]
+        patterns'' = map (combineMultiCard . map (:[])) patterns'                            -- [ [m1,m2,..], [m1,m2,..] ] == [[[w1], [w2],..], [[w1],[w2],..]]
 
     -- quickSearch ...
 
-        ps' = map ( C.pack . (\l -> if null l then ""
-                                              else maximumBy (compare `on` length) l) . mapMaybe (\x -> case x of
-                                    TokenCard (Generic.TokenLiteral xs _) -> Just (unquotes $ trim xs)
-                                    TokenCard t                           -> Just (tkToString t)
-                                    _                                     -> Nothing)) patterns'
+        ps' = map C.pack $ (mapMaybe (\x -> case x of
+                                            TokenCard (Generic.TokenLiteral xs _) -> Just (unquotes $ trim xs)
+                                            TokenCard t                           -> Just (tkToString t)
+                                            _                                     -> Nothing
+                                     ) . concat) patterns'
 
+        found = quickSearch opt ps' text'
+
     -- put banners...
 
     putStrLevel1 (debug opt) $ "strategy  : running generic semantic search on " ++ filename ++ "..."
@@ -71,7 +73,6 @@
     putStrLevel2 (debug opt) $ "multicards: " ++ show patterns''
     putStrLevel2 (debug opt) $ "identif   : " ++ show ps'
 
-    let found = quickSearch opt ps' text'
 
     if maybe False not found
         then return $ mkOutput opt filename text text []
