Then I want to be able to search these arrays, and if they have what I'm searching for, I want to output the information. If they don't have what I'm searching for, I want to discard them.
The part I'm stuck on right now is that the first Regex puts everything into an array (matches_array_1,matches_array_2,matches_array3,etc)
Then I'm using:
Let>k=0
Label>Loop
Let>k=k+1
Let>TextVariables=matches_array_%k%
if>%k%=%num_matches%,End,Loop
To let the TextVariables variable change its value within a loop to match the initial Regex's num_matches so it knows when to stop.
Is there a better way to do this?
Code: Select all
wait>5
Let>INPUT_BROWSE=1
Input>DelveFileName,Find the delve file you want to parse.,C:DelveTest.txt
ReadFile>C:DelveTest.txt,strFileContents
Let>pattern=(?s)\[\d\d:\d\d:\d\d\] <Begin Info:.*?<End>
regex>pattern,%strFileContents%,0,matches_array,num_matches,0
Input>Input2,What stat would you like to parse for?,.*
Let>k=0
Label>Loop
Let>k=k+1
Let>TextVariables=matches_array_%k%
Let>pattern2=(?is)\[\d\d:\d\d:\d\d\] <Begin Info:.*?%Input2%.*?<End>
regex>pattern2,TextVariables,0,matches_array2,num_matches2,0
if>%k%=%num_matches%,End,Loop
Label>End