diff --git a/Build/git-hooks/commit-msg b/Build/git-hooks/commit-msg
index 4e4fb19c990af3c8346513bbb668b4d8cfec4718..97e5e9d31fb5eb7803a217373a8ee2192226bf3a 100755
--- a/Build/git-hooks/commit-msg
+++ b/Build/git-hooks/commit-msg
@@ -222,7 +222,7 @@ checkForResolves() {
 # Check for existence of a "Releases: " line.
 #
 checkForReleases() {
-	if ! egrep -q '^Releases: (master|[0-9]\.[0-9])(, *(master|[0-9]\.[0-9]))*$' "$MSG"; then
+	if ! egrep -q '^Releases: (master|[0-9]+\.[0-9])(, *(master|[0-9]+\.[0-9]))*$' "$MSG"; then
 		COMMIT_MSG_ERROR_FOUND=1
 		ERROR_TEXT="${ERROR_TEXT} - You need a 'Releases:' line. For instance: Releases: master, 8.7\n"
 	fi