|
|
|
Click here to copy the following block |
Function SplitQuoted(ByVal Text As String, Optional ByVal Separator As String = _ ",", Optional ByVal Quotes As String = """") As ArrayList Dim res As New ArrayList() Dim openChar As String = System.Text.RegularExpressions.Regex.Escape _ (Quotes.Chars(0)) Dim closeChar As String = System.Text.RegularExpressions.Regex.Escape _ (Quotes.Chars(Quotes.Length - 1)) Dim pattern As String = "\s*(" & openChar & "([^" & closeChar & "]*)" & _ closeChar & "|([^" & Separator & "]+))\s*"
Dim m As System.Text.RegularExpressions.Match For Each m In System.Text.RegularExpressions.Regex.Matches(Text, pattern) Dim g3 As String = m.Groups(3).Value If Not (g3 Is Nothing) AndAlso g3.Length > 0 Then res.Add(g3) Else res.Add(m.Groups(2).Value) End If Next Return res End Function |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|