I got quite a lot of strings (segments of SQL code, actually) with the following format:
('ABCDEFG', 123542, 'XYZ 99,9')
and i need to split this string, using C#, in order to get:
- 'ABCDEFG'
- 123542
- 'XYZ 99,9'
I was originally using a simple Split(',')
, but since that comma inside the last parameter is causing havoc in the output i need to use Regex to get it. The problem is that i'm still quite noobish in regular expressions and i can't seem to crack the pattern mainly because inside that string both numerical and alpha-numerical parameters may exist at any time...
What could i use to split that string according to every comma outside the quotes?
Cheers
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…