OK, here is a problem I have been unsuccessfully trying to cope with, writing a batch script. Suppose I have a file containing, say, some youtube addresses (for example a ht
I'll use another scripting language as Bat to do that. Here I made a little exemple in Autoit :
StringBetween.au3
#include
Local $hOutFile=FileOpen("output.txt",2)
Local $hTexte=FileRead($CmdLine[1])
$AFind=_StringBetween($hTexte,$cmdline[2],$cmdline[3])
For $i= 0 To UBound($Afind)-1 step 1
FileWrite($hOutFile,$AFind[$i]&@crlf)
Next
FileClose($hOutFile)
You can compile it yourself or Download it already compiled here :
StringBetween.rar
Usage :
Stringbetween [InPutFile] [StringRight] [StringLeft]
Ouput : "Output.txt"
In your case :
Stringbetween.exe "example.html" ""
A file "Output.txt" will be created with :
https://www.youtube.com/watch?v=9bZkp7q19f0
https://www.youtube.com/watch?v=kYtGl1dX5qI&list=RD9bZkp7q19f0
https://www.youtube.com/watch?v=lWA2pjMjpBs&list=RD9bZkp7q19f0