Java / Linux and Regular Expressions
Posted on 2016-11-10
From within Java, I want to search an external text file called log.txt, starting at the bottom of the file, and read backwards, reading a word at a time, until I find a string sequence that starts with any a space, then any 5 Capital Letters, followed by a underscore, followed by the word "Forecast"
So, starting from the bottom of the file and working up, find the first occurrence of something like this: " RAWV2_Forecast"
Ideally I would get the 5 letter sequence returned to the Java program