I am trying to write a Windows batch file that will look through a specific html file that looks something like this (simplified):
<input name="pattern" value="*.var" type="text" /><img style="width: 16px; height: 16px; vertical-align:middle; cursor:pointer" onclick="this.parentNode.submit()" class="icon-go-next icon-sm" src="/static/474743c8/images/16x16/go-next.png" /></form></div><table class="fileList"><tr><td><img style="width: 16px; height: 16px; " class="icon-text icon-sm" src="/static/474743c8/images/16x16/text.png" /></td><td><a href="./address.var.varapplication-varapplication-varwebservice-05.05.07-SNAPSHOT.var">address.var.varapplication-varapplication-varwebservice-05.05.07-SNAPSHOT.var</a></td><td class="fileSize">133.49 MB</td><td><a href="./address.var.varapplication-varapplication-varwebservice-05.05.07-SNAPSHOT.var/*fingerprint*/"><img style="width: 16px; height: 16px; " class="icon-fingerprint icon-sm" src="/static/474743c8/images/16x16/fingerprint.png" /></a> <a href="./address.var.varapplication-varapplication-varwebservice-05.05.07-SNAPSHOT.var/*view*/">view</a></td></tr><tr><td style="text-align:right;" colspan="3"><div style="margin-top: 1em;"><a href="./*.var/*zip*/target.zip"><img style="width: 16px; height: 16px; " class="icon-package icon-sm" src="/static/474743c8/images/16x16/package.png" />
and use the build version (e.g. 05.05.07-SNAPSHOT - next time will be another version but the format remain the same) as variable for another batch file. I have tried with findstr but no success:
for /F "delims=" %%a in ('findstr /ic "webservice" a.html') do set "line=%%a"
set "line=%line:*webservice=%"
for /F "delims=" %%a in ("%line%") do set string=%%a
for %%b in ("%line%") do @ set "var=%%b"
SET build=%var:~-11,8%
ECHO. %build%