I am trying to parse a log file using regular expressions
and I ran into a challenge. The section
of the log file has a distinct beginning and a distinct end, but the number of
lines in between might vary.
Is there a way I can use regular expressions to pull the
beginning of the section, the end of the section and everything in between
regardless of the number of lines and or characters?
Here is an example of what I am trying to parse out:
******* script runtime error *******
type undefined is not a vector: (file 'k3/_laserguided.gsc',
line 120)
playfx(level.fx_guided_exp,trace["position"]);
//,trace["normal"]); // SOMETIMES IT PLAYS WRONG DIR
o_O
*
Error: started from:
(file 'k3/_laserguided.gsc', line 91)
wait 0.05;
*
Error: ************************************
In some cases, there are more than one errors listed in the body
after ‘script runtime error’ and ‘Error:’
Any help would be appreciated.