diff --git a/release.sh b/release.sh
index 84c40696316045fd1ce528fd92ab2d3366dc1926..6d08cac71dfcaaae0f2f7cab4eee8843aaeccf8a 100755
--- a/release.sh
+++ b/release.sh
@@ -4,7 +4,7 @@
 current=`grep -P "__version__ = \"\d+.\d+.\d+(\w*)\"" duniterpy/__init__.py | grep -oP "\d+.\d+.\d+(\w*)"`
 echo "Current version: $current"
 
-if [[ $1 =~ ^[0-9]+.[0-9]+.[0-9]+[0-9a-z]*$ ]]; then
+if [[ $1 =~ ^[0-9]+.[0-9]+.[0-9]+-*[a-z]*\.*[0-9]*$ ]]; then
   # update version in duniterpy
   sed -i "s/__version__ = \".*\"/__version__ = \"$1\"/g" duniterpy/__init__.py
   # update version in pyproject.toml