I use split quite a bit for string manipulation and ran into an interesting issue the other day with it when parsing a CSV file with a multi-value field that itself contained comma delimited data.
For example….
214,Bob,Johnson,12/28/1968,(Florida,Texas,Washington),$3,444,234.03
RegEx to the rescue….
Dim re Set re = new RegExp re.Global = true re.pattern = ",(?=[^()]*\))" re.Replace(strInput, "|")
Advertisement