diff --git a/smartmontools/ChangeLog b/smartmontools/ChangeLog
index 4a188a7d8bc18a22080f695d4413f4e116d7dd13..9ffbecf3b53e82121c628b4f9c05d036f24b44ef 100644
--- a/smartmontools/ChangeLog
+++ b/smartmontools/ChangeLog
@@ -2,6 +2,8 @@ $Id$
 
 2022-02-02  Christian Franke  <franke@computer.org>
 
+	update-smart-drivedb.in: Fix regexp quoting.
+
 	os_linux.cpp: Enhance device scan range to '/dev/sdzz'.
 	smartd.8.in: Update related documentation.
 
diff --git a/smartmontools/update-smart-drivedb.in b/smartmontools/update-smart-drivedb.in
index 68eb26b0948015148ae4cab4836bdc23a29b684c..f70650b50dcd8102d2cd05014f4c8a143ba33029 100644
--- a/smartmontools/update-smart-drivedb.in
+++ b/smartmontools/update-smart-drivedb.in
@@ -4,7 +4,7 @@
 #
 # Home page of code is: https://www.smartmontools.org
 #
-# Copyright (C) 2010-21 Christian Franke
+# Copyright (C) 2010-22 Christian Franke
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 #
@@ -538,7 +538,7 @@ get_db_version()
   v=${x%% *}
   test -n "$v" || return 0
   if [ "${v%/*}" = "$v" ]; then # trunk: get rev from expanded SVN-Id
-    r=$(echo "$x" | sed -n 's,^[^$]*$Id: drivedb\.h \([1-9][0-9]*\) .*$,\1,p')
+    r=$(echo "$x" | sed -n 's,^[^$]*\$''Id: drivedb\.h \([1-9][0-9]*\) .*$,\1,p')
     test -n "$r" || r="?"
     v="$v/$r"
   fi