title: How to split the variable in Gitlab pipline (.gitlab-ci.yml)
body: <p>I have a branch name, for example, release-1.1.3, how I can split and extract the version by writing some logic in gitlab-ci file. Is there some method available for it?</p>
  
  <p><strong>before_script</strong></p>
  
  <ul>
  <li><p>export BRANCH_NAME=$CI_COMMIT_REF_NAME </p>
  
  <p>// here I want to do something to extract the version </p></li>
  <li><p>export Major=BRANCH_NAME.someoperation</p></li>
  <li>export Minor=BRANCH_NAME.someoperation</li>
  <li>export PATCH=BRANCH_NAME.someoperation</li>
  </ul>
  
  <p>any other approaches are also welcome but I required the value in a separate variable which I can pass it to other operations.</p>
  
  <p>I am new to gitlab-ci and working on it, thanks in advance.</p>