title: Print only a specific part of a string
body: <p>I have a jsp program(using scriplets) that generates the output in a string.</p>
  
  <p>My JSP Code:</p>
  
  <pre><code>&lt;HTML&gt;
  -------
  -------
  &lt;%
  -------
  -------
  a=new String(tmp, 0, i);
  out.println(a);
  -------
  -------
  %&gt;
  -------
  &lt;/HTML&gt;
  </code></pre>
  
  <p>Here I am getting the output successfully. But there is a lot of unnecessary data that I get along with it. My jsp shows the output like:</p>
  
  <p>Values: XXXXXX Location: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....</p>
  
  <p>I want to print only the Values part of the string. I want to omit everything that starts from "Location: XXXXXXXXX" onwards. It always gives me an output in this format.</p>
  
  <p>Is there any way to do this? </p>
  
  <p>Any help would be appreciated. Thanks in advance.</p>