5 Replies Latest reply on Apr 12, 2013 12:10 AM by Dipak Gaigole

    Does nsh not support =~ and if not what alternatives are there?

      I have a script in which I use the following line:

       

      [[ ! "${1}" =~ '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$' ]] && echo "Version needs to be in the format NN.NN.NN.NN e.g. '1.2.3.4' Exiting ..." && exit 1

       

      According to the documentation (see link below), zsh seems to support the =~ operator, however nsh throws an error condition expected: =~

       

      http://zsh.sourceforge.net/Doc/Release/Conditional-Expressions.html

       

      What can I use if not the =~ operator?