diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dcc0073f044180c9805c0cb7951ae98094c78d5b..d807e7fd283b367ab1be56f3747dd8738adf3689 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -18,7 +18,7 @@ variables:
 set_version:
   stage: .pre
   script:
-    - if [[ $CI_COMMIT_TAG =~ "^LOFAR-Release-[0-9]_[0-9]_[0-9]" ]]; then TMP=${CI_COMMIT_TAG//LOFAR-Release-/}; VERSION=${TMP//_/.}; fi
+    - if [[ $(expr match $CI_COMMIT_TAG  "^LOFAR-Release-[0-9]_[0-9]_[0-9]") != 0 ]]; then echo "joh"; TMP=${CI_COMMIT_TAG//LOFAR-Release-/}; VERSION=${TMP//_/.}; fi
     - echo "BUILDING $VERSION"
 
 #