a while ago, I created a program to process vCard files. This could be done virtually perfectly with the following:
(?<FIELD>[^s:;]+)(;(?<PARAM>[^:]+))*:(?<CONTENT>.*(?>
[ ].*)*)$
However, this doesn t work for the new (August 2011) vCard 4.0 standard. The problem is that vCard 4.0 files use the following layout:
FIELD(:)(;([PARAMETER]="[CONTENT],[MORE CONTENT]"(;))[DATATYPE(:)]:)CONTENT[newline]
e.g.
ADR;type="home,work":(address)
如你所看到,我要抓住整个参数,包括“......”的字面。
So my question is: can my code be modified or will I have to write two processes (one for the old types and one for the new 4.0 version; ideally, I would like to support both) and if so, how? (I m using c# and .net 4.0 by the way).
在这方面。