I have an application I am working on for a client that keeps a log file of the last cron for reminder emails sent and in the log it has:
*****************
app ID: 123 / app status: 0 / deposit paid: 0 / email@domain.com
date created: 2009-03-14 00:00:00
last updated: 1969-12-31 06:00:00pm
USING for date comparison: 2009-03-14 12:00:00am
EXPIRE THIS APP
I am trying to figure out how to grab the line that has app ID: 123 / app status: 0 / deposit paid: 0 / email@domain.com if it is followed by EXPIRE THIS APP because not all of them will have it.
You’ll need to be careful that your regex isn’t too loose, or greedy matching will give false matches. Here is a good start: