diff --git a/test/removeHtmlDates.sh.in b/test/removeHtmlDates.sh.in
index 7276695f7..093c7d3a0 100755
--- a/test/removeHtmlDates.sh.in
+++ b/test/removeHtmlDates.sh.in
@@ -13,6 +13,6 @@ set -o errexit -o noclobber -o nounset -o pipefail
while IFS= read -d '' -r htmlFile; do
sed -Ei \
-e '/headerItem">Test:{s/>.*:/>Project:/;n;s/>.*>${PROJECT_NAME}}' \
- -e '/headerItem">Date:{s/>.*:/>Version:/;n;s/>.*>${PROJECT_VERSION}${PROJECT_VERSION_SUFFIX}}' \
+ -e '/headerItem">(Test )?Date:{s/>.*:/>Version:/;n;s/>.*>${PROJECT_VERSION}${PROJECT_VERSION_SUFFIX}}' \
"$htmlFile" < /dev/null
done < <(find '${PROJECT_BINARY_DIR}/coverage/' -name '*.html' -print0)