I want to increment numeric values in file content. I have already sorted out a list count ahk. What I like about it is that it lets me stdin-stdout from any file type to any file type and it reads its contents into a loop parse. I'm also trying to sort out a counter that will increment numeric values by 1 according to the same means. This is what I have put together:
Code: Select all
FileRead, H, C:\your path\Results
var := str
Loop, Parse, var, `n, `r
{
RegexMatch(a_loopfield, "=(\d+)", m)
str .= RegexReplace(a_loopfield, m, "=" m1+1)
}
FileAppend, % var, Results
What needs to happen in order for this RegexMatch increment function to maintain this FileRead, H, C:\ > regex loop parse > FileAppend composure?
[Mod edit: Provisional topic name added. Change as you wish!]