I\'m trying to parse a file that has the following format:
BEGIN:VEVENT
CREATED:20120504T163940Z
DTEND;TZID=America/Chicago:20120504T130000
DTSTAMP:20120504T1640
Try:
(?[^:;]*)[:;](?[^\s]*)
C# snippet:
Regex regex = new Regex(
@"(?[^:;]*)[:;](?[^\s]*)",
RegexOptions.None
);
It takes a string of any character but a colon or semicolon as the key, and then anything else but whitespace as the value.
If you want to test it or make changes, check out the regex checker I have on my blog: http://blog.stevekonves.com/2012/01/an-even-better-regex-tester/ (requires silverlight)