diff --git a/src/MixERP.Net.VCards/Helpers/VCardHelper.cs b/src/MixERP.Net.VCards/Helpers/VCardHelper.cs index b98e798..ce698ab 100644 --- a/src/MixERP.Net.VCards/Helpers/VCardHelper.cs +++ b/src/MixERP.Net.VCards/Helpers/VCardHelper.cs @@ -6,7 +6,16 @@ public static class VCardHelper { public static string[] SplitCards(string contents) { - return Regex.Split(contents, "((BEGIN:VCARD)(.*)(END:VCARD))"); + var rx = new Regex("BEGIN:VCARD(?s)(.*?)END:VCARD"); + var matches = rx.Matches(contents); + var cards = new string[matches.Count]; + + for (var i = 0; i < matches.Count; i++) + { + cards[i] = matches[i].ToString(); + } + + return cards; } } -} \ No newline at end of file +}