I use the split function of in VBScript to split the string. Below is the code am using.
Dim inputText
DIM resultArray
inputText = "abc; def; ""xyz;123"""
resultArray = Split(inputText, "; ")
For i = 0 To UBound(resultArray)
resultArray(i) = Replace(resultArray(i), """", "")
resultArray(i) = Replace(resultArray(i), ";", "")
IF i = UBound(resultArray) THEN
Response.Write resultArray(i)
ELSE
Response.Write resultArray(i) & "; "
END IF
Next
If i remove the space after ; in split function it will also split "xyz:123" which i don't want to be.
Either i gave space after ; in split function (Line # 4) or not it shouldn't split the "xyz:123" which comes in double quotes.
Any suggestion how i can achieve this ?
Thanks in advance.