title: How to replace a given substring with "" from a given string?
body: <p>I went through a couple of examples to replace a given sub-string from a given string with <code>""</code> but could not achieve the result. The String is too long to post and it contains a sub-string which is as follows:-</p>
  
  <pre><code>/image/journal/article?img_id=24810&amp;amp;t=1475128689597
  </code></pre>
  
  <p>I want to replace this sub-string with "".Here the value of  <code>img_id</code> and <code>t</code> can vary, so I would have to use regular expression. I tried with the following code:-</p>
  
  <pre><code>String regex="^/image/journal/article?img_id=([0-9])*&amp;amp;t=([0-9])*$";
  content=content.replace(regex,"");
  </code></pre>
  
  <p>Here content is the original given string. But this code is actually not replacing anything from the <code>content</code>. So please help..any help would be appreciated .thanx in advance.</p>