title: Sed to extract text between two strings
body: <p>Please help me in using sed.
  I have a file like below. </p>
  
  <pre><code>START=A
    xxxxx
    xxxxx
  END
  START=A
    xxxxx
    xxxxx
  END
  START=A
    xxxxx
    xxxxx
  END
  START=B
    xxxxx
    xxxxx
  END
  START=A
    xxxxx
    xxxxx
  END
  START=C
    xxxxx
    xxxxx
  END
  START=A
    xxxxx
    xxxxx
  END
  START=D
    xxxxx
    xxxxx
  END
  </code></pre>
  
  <p>I want to get the text between START=A, END. 
  I used the below query.</p>
  
  <pre><code>sed '/^START=A/, / ^END/!d' input_file
  </code></pre>
  
  <p>The problem here is , 
  I am getting </p>
  
  <pre><code>START=A
    xxxxx
    xxxxx
  END
  START=D
    xxxxx
    xxxxx
  END
  </code></pre>
  
  <p>instead of </p>
  
  <pre><code>START=A
    xxxxx
    xxxxx
  END
  </code></pre>
  
  <p>Sed finds greedily. </p>
  
  <p>Please help me in resolvng this.</p>
  
  <p>Thanks in advance.</p>
  
  <p>Can I use AWK for achieving above? </p>