@ Guest: your example only put the quote mark at the beginning and at the end of the txt file, not in each line. I replaced %filepath% with "text.txt" which lies on the desktop, along with the ahk script you provided.
@ answer4u: the same as above.
@ None: your example has the limitation that I have to previously know the # of lines of the txt file and edit it in the script every time. I couldn't figure out a method to make this detection automatic and store the output number into a variable, and I suspect that this would bring extra unecessary complication
@ Leef_me. Didn't work. I substituted "infile" to "text.txt" and kept outfile intact.
@ hugoV: bringing in knowledge of another variable or function I don't know yet is not helping me. Also, this use not only RegEx, which is messy to me (shouldn't be, I thought I was a smart guy), but also something beyond regex:
Quote:
* Purpose: Find and Replace text in entire file (using RegExReplace)
* Parameters: Text, NeedleRegEx, Replacement
* Credits: Heresy / HugoV
TF_RegExReplace("File.txt","im)^(.*)$","[$1]") ; pass on file, wrap all lines in []
And sorry for not identifying me at the beginning of the topic.
