The call to VCardHelper.SplitCards() not only failed for my initial test with multiple vcards in one file, but looking at the regex call, it is completely ineffective. Not only does it look like Regex.Split() is misunderstood, but the regular expression itself --using default options-- will not match any vcard. First of all, the Split function expects a pattern to match delimiters, not the full expression. Next, the default interpretation of the period (.) operator is all characters except \n. So immediately the pattern should fail to match any vcard with line breaks. But even if it did match line breaks, the * is by default greedy and will continue to match every character until the very last "END:VCARD", so it would still not separate multiple vcards.
I have already crafted a valid regex and can submit a change, but I'm completely new to contributing on github and also want to get feedback, since I would be surprised if absolutely nobody has tried importing a multi-vcard file or string.
The call to
VCardHelper.SplitCards()not only failed for my initial test with multiple vcards in one file, but looking at the regex call, it is completely ineffective. Not only does it look likeRegex.Split()is misunderstood, but the regular expression itself --using default options-- will not match any vcard. First of all, the Split function expects a pattern to match delimiters, not the full expression. Next, the default interpretation of the period (.) operator is all characters except \n. So immediately the pattern should fail to match any vcard with line breaks. But even if it did match line breaks, the * is by default greedy and will continue to match every character until the very last "END:VCARD", so it would still not separate multiple vcards.I have already crafted a valid regex and can submit a change, but I'm completely new to contributing on github and also want to get feedback, since I would be surprised if absolutely nobody has tried importing a multi-vcard file or string.