title: retrieve a word after a regular expression in shell script
body: <p>I am trying to retrieve specific fields from a text file which has a metadata as follows:</p>
  
  <pre><code>project=XYZ; cell=ABC; strain=C3H; sex=F; age=PQR; treatment=None; id=MLN
  </code></pre>
  
  <p>And I have the following script for retrieving the field <code>'cell'</code></p>
  
  <pre><code>while read line
  do
  cell="$(echo $line | cut -d";" -f7 )"
  echo  $cell
  fi
  done &lt; files.txt
  </code></pre>
  
  <p>However the following script retrieves the whole field as <code>cell=ABC</code> , whereas I just want the value <code>'ABC'</code> from the field, how do I retrieve the value after the regex, in the same line of code?</p>