Hoping some regexp gurus might be lurking on the board today... I am parsing in a textfile that contains 300 emails with form data inside. I have 7 strings to match and once a match is found I need to grab all subsequent characters until the line break and save them to an array.
So I start with this:
$filename="/home/address/text.txt";
$fd=fopen($filename,"r");
$body=fread($fd,filesize($filename));
$lines=split("\n",$body);
for ($i=0;$i<count($lines);$i++){
$DoSomethingWith = $lines[$i];
}
fclose($fd)
But how do I create a regexp statement to grab all characters following "Name......................:" until the linebreak?
I have read the manual and online tutorials but REGEXP is a bit tricky and an example might let me keep exploring my solution...
Thanks for any help offered.