Welcome to the Monastery | |
PerlMonks |
Re: Unable to constrain the effect of a negative lookaheadby johngg (Canon) |
on Apr 14, 2022 at 15:50 UTC ( [id://11142986]=note: print w/replies, xml ) | Need Help?? |
Instead of a complex and possibly difficult to maintain regex I would approach the problem a different way. I would treat $SYSPBUFF as a file and read it line by line until I reached the "batch =" line, at which point I'd last out of the loop to cease reading any further. Lines of interest would be pushed onto an array ready for further processing. I haven't tried tidying the lines up, leading spaces, trailing comma etc., I'll leave that to the reader.
I hope this is helpful. Cheers, JohnGG
In Section
Seekers of Perl Wisdom
|
|