S
Sandman
Indata:
-------------------------------------
Date: 2006-04-03
Message: Wonderful! Let's
meet there! I'll call you
later
Sent by: John
-------------------------------------
I want this parsed into:
Array (
[Date] => "2006-04-03",
[Message] => "Wonderful! Let's\nmeet there! ....."
[Sent by] => "John"
)
By defining keywords that data should be split in, in this case
"Date", "Message", "Sent by" and that those should be the first word
on the line and they should be followed by a ":". The Message part in
my actual indata is at no risk of containing any of these keywords.
Any cute ideas on how to solve that? Thanks in advance.
-------------------------------------
Date: 2006-04-03
Message: Wonderful! Let's
meet there! I'll call you
later
Sent by: John
-------------------------------------
I want this parsed into:
Array (
[Date] => "2006-04-03",
[Message] => "Wonderful! Let's\nmeet there! ....."
[Sent by] => "John"
)
By defining keywords that data should be split in, in this case
"Date", "Message", "Sent by" and that those should be the first word
on the line and they should be followed by a ":". The Message part in
my actual indata is at no risk of containing any of these keywords.
Any cute ideas on how to solve that? Thanks in advance.