title: Extract substring between 2 strings
body: <p>Here are my code segment:</p>
  
  <pre><code>set CMS_SQL="cms91_to_913.json cms913_to_9132.json cms9132_to_9133.json cms9133_to_10100.json"
  set CMS_FROM_VERSION="cms913_"
  set CMS_TO_VERSION="to_9133.json"
  </code></pre>
  
  <p>Both <strong>CMS_FROM_VERSION</strong> and <strong>CMS_TO_VERSION</strong> are variables</p>
  
  <p>I want to extract substring <code>"cms913_to_9132.json cms9132_to_9133.json"</code> from <code>%CMS_SQL%</code></p>
  
  <p>Just want to get the substring between <code>%CMS_FROM_VERSION% and %CMS_TO_VERSION%</code> containing these two variable values</p>
  
  <p>Do not want to use file to do this and also do not want to hard code number to get the substring, since the two strings are variables. </p>
  
  <p>How extract substring between these two strings? 
  Thanks</p>