title: How can we extract substring of the string by position and separator
body: <p>How can we divide the substring from the string </p>
  
  <p>Like I have string </p>
  
  <pre><code>String mainString="///Trade Time///Trade Number///Amount Rs.///";
  </code></pre>
  
  <p>Now I have other string</p>
  
  <pre><code>String subString="Amount"
  </code></pre>
  
  <p>Then I want to extract the substring  <code>Amount Rs.</code> with the help of second string named <strong>subString</strong> not by any other method But it should be extracted through two parameters like  first is I have index no of Amount string and second is until the next string ///.</p>