I am trying to use JREPL.bat to match URLs containing a specific term in a txt file (and then write the result back to the file).
This is what I have so far, unfortunately it is not returning the expected result. The result is always NULL:
JREPL.bat "href=""(\w[^""]+/pdf4v/\w[^""]+)" "" /match /f html.txt /o -
The html.txt
looks as follows (in reality the file is much more complex; additional content represented by [...]):
[...]
<ul>
<li><a href="#" id="fav" onclick="return favoritesadd(8094,'fav.png','removefav.png');"><img id="fav8094" src="fav.png" alt="" border="0" /> <span id="fav8094">ADD TO WISHLIST</span></a></li>
<li class="sixcol right"><a href="https://documents.domain.com/content/updates/year18/jv/folder01/pdf/pdf8094.zip?exp=1567791065&hsh=5a49e7d4828603beddbfb058a1535f5e&dl=att&filename=pdf-00008094-16.pdf" class="tcenter"><img src="pdf.png" class="icon" align="left" />16<br /><span class="small">download pdf</span></a></li>
<li class="sixcol"><a href="https://documents.domain.com/content/updates/year18/jv/folder01/pdf4v/pdf4v8094.zip?exp=1567791065&hsh=246a7702296f7db363ecaa1746a8815a&dl=att&filename=pdf-00008094-40.pdf" class="tcenter"><img src="pdf.png" class="icon" align="left" />40<br /><span class="small">download pdf</span></a></li>
<div class="clear"></div>
<li><a href="/details.php?id=8094&num=1&ss=1" onclick="$.open();return false;"><img src="/images/details.png" class="center" />Details</a></li>
</ul>
[...]
The expected outcome is:
https://documents.domain.com/content/updates/year18/jv/folder01/pdf4v/pdf4v8094.zip?exp=1567791065&hsh=246a7702296f7db363ecaa1746a8815a&dl=att&filename=pdf-00008094-40.pdf
Can anyone help? I am not sure why this isn't working.
Thanks in advance for your help!