title: regex to replace string inside shell script
body: <p>I have a string in a line which I want to replace. The test that I need to replace is in the line below</p>
  
  <pre><code>&lt;property name="name"&gt;&lt;![CDATA[string to replace]]&gt;&lt;/property&gt;
  </code></pre>
  
  <p>I was trying to use regex and form groups. I can form three groups but not able to replace them within my shell script using sed or egrep. I am trying to replace it with another string such as 'dummytext'</p>
  
  <pre><code>(.*CDATA\[)([a-zA-Z0-9].*)(]]&gt;&lt;.*)
  
  sed 's/(.*CDATA\[)([a-zA-Z0-9].*)(]]&gt;&lt;.*)/\1dummytext\3/'
  </code></pre>
  
  <p>I have most of my script written in bash, so don't want to switch to python or another language. The find and replace can be dome using another tool if not sed.</p>