I want to search some regex patterns in files (*.txt) which are inside a folder whose path I'have given in a text box, and the folder contains other sub-folders with txt files in the form 12345-2031-30201\2031\30201\txt\110.txt and if the pattern matches even in one file, then a string is written on a log file which is created inside the folder whose path I've given in the text box and then it moves on to the next regex and so on.
The problem I'm having is the log file writing the matches found in the form
"D:\test\bk\1235-12-3053\230\124\txt\124.txt: Check table link, Check section link, Check figure link "
"D:\test\bk\123561-1-2356\230\129\txt\129.txt: Check section link, Check table link"
However I want it show the macthes found in the below fashion
"Check figure link"==
D:\test\bk\1235-12-3053\230\124\txt\124.txt
D:\test\bk\1235-12-3053\230\131\txt\131.txt
"Check table link"==
D:\test\bk\1235-12-3053\230\124\txt\124.txt
D:\test\bk\1235-12-3053\230\205\txt\205.txt
and so on