I am quite new with AHK, I would like to query how I can use AutoHotKey loop to read many TXT files in a folder, look for content string/Regex and replace with other string/Regex, so far i got this (but i cannot apply it to a loop, I have tried to look into the official documentation but still cannot make it works) I have tried to change to M3 to select multiple files, still does not works:
FileSelectFile, SelectedFile, 3,%A_WorkingDir%, Open a file, , ,(*.txt)
fileread, text, % SelectedFile
text := RegExReplace(text,"(?<=\<target\>).*?(?=\<\/target\>)"," ",all) ;this will look content between tags <target> and replace with empty content
filedelete, % SelectedFile
fileappend, %text%, % SelectedFile
Thank you in advance!