I'm trying to read through a huge text file, approx 10 gigabytes. I want to find the last occurrence of a string.
e.g below is a sample of 5 lines the 2nd and 5th are the same string.
I want to take the last one as it is the latest and output that to a text file using streamreader.
Am I better off using Regex or am I better off using a lastindexof
to determine if it is the last string?
I have a lot of these searches to do so I would create some kind of array and have it search from bottom up to improve performance.
Can someone point me in the right direction?
GET/a/users/115656WindowsNT6.1;Trident
GET/a/users/126692MSIE7.0;WindowsNT6.1
GET/a/users/77562WindowsNT6.1;WOW64;Tr
GET/a/users/35650WindowsNT6.1;WOW64;Tr
GET/a/users/126692MSIE7.0;WindowsNT6.2