i try to get the text between 2 words multiple times.
I need the text between "/ebooks/pdf/" and ".pdf" from my clipboard.
My code is this at the moment, but it always write the first found and doesn't contine and stop when all found.
Maybe someone know what is missing in my code.
Code: Select all
Clipboard := "<ul class= metis toc-tree manual-toggle ><li><a data-pdf-link= /ebooks/pdf/cs_8456412/263460101_001.pdf class= tocPdfContainer href= # >Titelei (PDF) <i class= fa fa-download ></i></a></li><li><a href= # class= toggler ><span class= fa plus-minus ></span></a><a onclick= toggleNode(this, event) href= # >Grundlagen</a><ul class= collapse ><li><a data-pdf-link= /ebooks/pdf/cs_8456412/263460101_002_001.pdf class= tocPdfContainer href= # >Das Checklistenkonzept" ; later get this from clipboard
testString := Clipboard
loop
{
RegExMatch(testString, "/ebooks/pdf/*\K.*?(?= *.pdf)", results)
FileAppend, %results%`n, %A_Desktop%\result.txt
}