title: how to extract line portion on the basis of start substring and end substring using sed or awk
body: <p>I have a multiline file with text having no spaces.</p>
  
  <pre><code>Thereisacat;whichisverycute.Thereisadog;whichisverycute.
  Thereisacat;whichisverycute.Thereisadog;whichisverycute.
  </code></pre>
  
  <p>I want to extract string between cat and cute (first occurrence not second) that is  the output is </p>
  
  <pre><code>;whichisvery
  ;whichisvery
  </code></pre>
  
  <p>I am close to getting it but I end up getting string from cat to the last cute with the command from <a href="https://stackoverflow.com/questions/13242469/how-to-use-sed-grep-to-extract-text-between-two-words/43795984?noredirect=1#comment89094299_43795984">here</a>.</p>
  
  <pre><code>sed -e 's/.*cat\(.*\)cute.*/\1/'
  </code></pre>
  
  <p>I am getting </p>
  
  <pre><code>;whichisverycute.Thereisadog;whichisvery
  ;whichisverycute.Thereisadog;whichisvery
  </code></pre>
  
  <p>How can I get the text from cat to the first occurrence of cute not last?</p>