PDA

View Full Version : Parsing a file with PHP



spec
March 2nd, 2002, 22:02
Ok so i have a log that i want to parse but only cetain parts.
say we have
1:00 Uselsess info: Blah Blah
1:01 Uselsess info: Blah Blah
1:02 Uselsess info: Blah Blah
1:03 Uselsess info: Blah Blah
1:04 Uselsess info: Blah Blah
1:05 Usefull info: woop woop
1:06 Useless info: Blah Blah

So i want my script to parse this info and take out woop woop
and do stuff with it
How do i first find "Usefull Info:"
and then take the information after that and use it

megapuzik
March 3rd, 2002, 06:10
http://www.php.net/manual/en/function.preg-match.php