title: Extract a pattern from string using regular exp in batch script
body: <p>I want to extract a sub-string based on pattern from a given string in <strong>batch script</strong>.</p>
  
  <p>Example:</p>
  
  <pre><code>Input :  ABCDEF-x32-32.12.20-298-date-20-12-17.exe
  Required Output : 32.12.20-298  (i.e. &lt;number&gt;.&lt;number&gt;.&lt;number&gt;-&lt;number&gt;)
  Regex (may be)  : [0-9]+\.[0-9]+\.[0-9]+-[0-9]+
  </code></pre>
  
  <p>How do I implement this in batch script??? I tried to implement the same using 'For' and 'findstr', but failed to do so.</p>