#!/bin/bash
s='3.6.212.0.dev'
re='^([0-9]+\.){4}(dev|prod)$'
if ! [[ "$s" =~ $re ]] ; then
  echo "error: Incorrect version specified; must be in the format of #.#.#.#.env"
else
  echo "$s is valid!"
fi