7 Replies Latest reply on Feb 4, 2014 12:22 PM by peter bulman

    best way to extract version number from a deploy job name using nsh?

      I am trying to extract the version number from a deploy job using sed eg:

       

      JOB='deploy_job_1.2.123'

      VERSION=`echo ${JOB} | sed '/_\d*\.\d*\.\d*/'`

       

      I am expecting VERSION to be set to 1.2.123

       

      Instead however I am getting the error:

      sed: 1: "/_\d*\.\d*\.\d*/": command expected

       

      Why is sed failing with this valid regex?

       

      thanks