fork(6) download
  1. #!/bin/bash
  2. s='3.6.212.0.dev'
  3. re='^([0-9]+\.){4}(dev|prod)$'
  4. if ! [[ "$s" =~ $re ]] ; then
  5. echo "error: Incorrect version specified; must be in the format of #.#.#.#.env"
  6. else
  7. echo "$s is valid!"
  8. fi
Success #stdin #stdout 0s 5512KB
stdin
Standard input is empty
stdout
3.6.212.0.dev is valid!