+6:: FileRead, Contents, C:\teste.txt ;~ newcon := RegExReplace (Contents, "a", "z") StringReplace, newcon, Contents, `(*[0-9]`), ZZ, All StringReplace, newcon, Contents, `—[0-9]`., ZZ, All FileAppend, ( %newcon% ), C:\testeFINAL.txt Return
Hello all!
My goal is to open a txt and replace every part this meets one of the following criteria with "nothing".
Criteria:
1- Is between paretheses AND the last characther before the closing parentheses is a number
2- Starts with — and the last the last characthers are a number followed by a dot.
I can't get RegExReplace to work even to go a simple "a" to "z" swap, so I'm using StringReplace.
Any ideas???
Thanks!
ps.: The "ZZ" is for testing purposes, than I'll chage it to ""
I'm using "autohotkey-L"