regex to parse a iCalendar file in ActionScript

Posted by Mac Fly on Stack Overflow See other posts from Stack Overflow or by Mac Fly
Published on 2010-03-19T17:51:26Z Indexed on 2010/05/03 6:18 UTC
Read the original article Hit count: 524

Hello,
I use a library to parse an iCalendar file, but I don't understand the regex to split property.
iCalendar property has 3 different style:

BEGIN:VEVENT
DTSTART;VALUE=DATE:20080402
RRULE:FREQ=YEARLY;WKST=MO

The library uses this regex that I would like to understand:

var matches:Array = data.match(/(.+?)(;(.*?)=(.*?)((,(.*?)=(.*?))*?))?:(.*)$/);
p.name = matches[1];
p.value = matches[9];                   
p.paramString = matches[2];

Thanks.

© Stack Overflow or respective owner

Related posts about actionscript-3

Related posts about regex