PHP - preg_match_all - iCalendar - REGEX
Posted
by aSeptik
on Stack Overflow
See other posts from Stack Overflow
or by aSeptik
Published on 2010-04-25T20:55:25Z
Indexed on
2010/04/25
21:03 UTC
Read the original article
Hit count: 324
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!
thank's to All for the time!
Regards Luca Filosfi
© Stack Overflow or respective owner