I need help with the below synthax
"s)2022-08-25,(.*)," should not return only 2.050000 ?
What should be the correct synthax to return only the in between value? anything between "2022-08-25," and ","
see code
Code: Select all
FileRead, FileRead1, file.txt
g:=grep(fileread1, "s)2022-08-25,(.*),")
for i, v in g
{
result1 := v.1
msgbox, %result1%
}
exitapp
grep(haystack, needle)
{
a:=[], match := "", pos := 1
while pos:=RegExMatch(haystack, needle, match, pos+StrLen(match))
a[A_Index]:= {"match": match, 1: match1}
Return a
}
return
; msgbox show
; 2.050000,2.200000,1.970000,2.190000,2.190000
; 2022-08-26,2.180000,2.220000,2.000000,2.010000,2.010000
; file.txt content
; 2022-08-25,2.050000,2.200000,1.970000,2.190000,2.190000
; 2022-08-26,2.180000,2.220000,2.000000,2.010000,2.010000