[FLINK-20532] Use proper 'sed' in updated docker image + extend regex to catch java8/11

This closes #46
diff --git a/generate-stackbrew-library-docker.sh b/generate-stackbrew-library-docker.sh
index c8c2a63..e555862 100755
--- a/generate-stackbrew-library-docker.sh
+++ b/generate-stackbrew-library-docker.sh
@@ -1,5 +1,15 @@
 #!/usr/bin/env bash
 
+# How to recreate below docker image
+# 
+# $ cat Dockerfile
+# FROM ubuntu:16.04
+# RUN apt-get update ; apt-get install -y git bash
+# 
+# $ docker build -t rmetzger/git-and-bash:latest .
+# $ docker push rmetzger/git-and-bash:latest
+#
+
 exec docker run --rm \
     --volume "${PWD}:/build:ro" \
     rmetzger/git-and-bash:latest \
diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh
index 98ffe13..d370529 100755
--- a/generate-stackbrew-library.sh
+++ b/generate-stackbrew-library.sh
@@ -45,9 +45,9 @@
         # tags contains latest version. keep "latest" tag
         echo $tags
     else
-        # remove "latest" and any "scala_" tag, unless it is the latest version
-        # the "scala_" tag has a similar semantic as the "latest" tag in docker registries. 
-        echo $tags | sed -E 's|, (scala\|latest)[-_.[:alnum:]]*||g'
+        # remove "latest", any "scala_" or "javaXX" tag, unless it is the latest version
+        # the "scala" / "java" tags have a similar semantic as the "latest" tag in docker registries. 
+        echo $tags | sed -E 's|, (scala\|latest\|java[0-9]{1,2})[-_.[:alnum:]]*||g'
     fi
 }