Is there any way to fetch the line with a key value, for eg in the below line in a notepad
“z4 = WorksheetFunction.CountIf(Sheets(“Data”).Range(“e” & y), “" & “REFUND” & "”)”
— I need to fetch the entire line using the word REFUND which is the key value, each time that key value can vary and there are close to 100 lines in text file. Any way to retrieve the entire line using the key value?
@shreyaank After you’re able to extract the Line from the above regex, you can Split the Extracted value based on “=” , and take the First Split, in this way :
I would want the regex pattern for finding THE ENTIRE LINE USING only the zvalue -z4
Can you pls share the regex pattern for fetching the the entire line using z4?