I'm new to Regex and I'm trying to extract a path from a string found inside a file. But there are many strings that could match the regex I managed to come up with so I came to the conclusion I need to apply the string only if it's enclosed between static strings.
The file looks like this:
14:58:15 [LC] AKF = 0-65535
14:58:15 [THR] CPU 02 : Engine (AFK)
14:58:15 [QA] Result Path : [/some/linux/path/Results/Test_2013_09_12_14_58_15]
14:58:15 [THR] Starting Listener
14:58:15 [THR] Starting Listener
What I'm not sure is if with a regex I could create a pattern that includes the enclosing strings ("[QA] Result Path : " and "]") or if I need to code that logic?
I'm using OpenJDK 1.7.