Hi All guys! ;-)
i need help with creating a regex for putting all values into an array!
assuming we have a huge file full of theese:
Classic iCalendar style:
so we know that each segment start with BEGIN:VEVENT
and end with END:VEVENT
...
END:VEVENT
BEGIN:VEVENT
UID:e3cafdf3-c5c7-427e-b8c3-653015e9321a
SUMMARY:Some Text Here
DESCRIPTION:Some Text Here\n555-555-555
ORGANIZER;CN=Some/Text/Here
DTSTART;TZID="Some/Text/Here":20100802T190000
DTEND;TZID="Some/Text/Here":20100802T193000
STATUS:CONFIRMED
CLASS:PUBLIC
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
TRANSP:OPAQUE
X-MICROSOFT-DISALLOW-COUNTER:TRUE
DTSTAMP:20100423T021222Z
SEQUENCE:1
END:VEVENT
BEGIN:VEVENT
...
by using preg_match_all that i think is the best choice for doing this, what's the regex that can hold all theese values into array!?
PS: between segments there are no line break this is just for example!
EDITED: just for clarification i want achieve a result like this:
Array
(
[0] => Array
(
[0] => '
UID:e3cafdf3-c5c7-427e-b8c3-653015e9321a
SUMMARY:Some Text Here
DESCRIPTION:Some Text Here\n555-555-555
ORGANIZER;CN=Some/Text/Here
DTSTART;TZID="Some/Text/Here":20100802T190000
DTEND;TZID="Some/Text/Here":20100802T193000
STATUS:CONFIRMED
CLASS:PUBLIC
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
TRANSP:OPAQUE
X-MICROSOFT-DISALLOW-COUNTER:TRUE
DTSTAMP:20100423T021222Z
SEQUENCE:1
'
)
[1] => Array
(
...
)
...
)
thank's to All for the time!
Regards Luca Filosfi