regex gurus listen

Jan Schneider janmailing@gmx.de
Thu, 12 Jul 2001 16:47:05 +0000


Hi regex gurus out there!

To make my vcard/ical-parser rfc2425-compliant I need a regex for a weird case. 

Take this line (remove linebreaks):
ATTENDEE;PARTSTAT=DELEGATED;DELEGATED-
TO="Mailto:E@example.com":Mailto:C@example.com

It has to be split at the first occuring colon _not_ in quoted string. In this 
case it has to be split at colon before the 2nd 'Mailto'.
If you use preg_split or preg_match_all doesn't matter but PLEASE help me 
because it already made me some bad headaches and I'm not a regex god. Not at 
all! ;-)

One general question: As you can imagine after this question I use regex to 
parse the files. All other ical/vcard-parsers I found use character parsing. 
What's your opinion about that?

Jan.

:::::::::::::::::::::::::::::::::::::::: 
AMMMa AG - discover your knowledge
:::::::::::::::::::::::::::
Detmolder Str. 25-33 :: D-33604 Bielefeld
fon +49.521.96878-0 :: fax  +49.521.96878-20
http://www.ammma.de
::::::::::::::::::::::::::::::::::::::::::::::