April 30th, 2013, 03:01 PM
Join Date: Apr 2013
Time spent in forums: 52 m 56 sec
Reputation Power: 0
PHP - I need help with a conditional requirement please.
I am parsing a file line by line, and I need to have a match if the line has a time goup on its own or if it is the first one of 5 time groups, but no match if it is one of 4 time groups. If a match the returned result should be the first time.
" 00:25 29:15 55:55 128:15 79:10 " Match need the first time
" 26:00 63:45 123:23 63:23 " require no match
" 00:25" Match need the time
I have tried
but this is the wrong approach I think.
To aid understanding these times are from a pilot roster, the time I am trying to cpture is the landing time after midnight. A flight over midnight only happens in case 1 and 3, however the other times which are duty times and flying times are not required.
I would appriciate a guru helping me.