| Author |
Regular expression required
|
Leno Skosan
Greenhorn
Joined: Apr 23, 2010
Posts: 3
|
|
Hi guys,
I have the following comma separated values in a string "1234,'abc',null,'def,ghi',5678,'jkl','mno ,pqr, stuv'". What I want to do is to split the string as follows:
1234
'abc'
null
'def,ghi'
5678
'jkl',
'mno ,pqr, stuv'
Any suggestions?
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8436
|
|
What have you tried so far and where are you stuck?
I would suggest looking into the String class for a method which would help you split the given string (hint)
Agreeably, this would not be an optimal way of doing things, but its the easiest.
Edit: Ok. My bad. I did not read the title mention regular expression.
So, even then, my original question still stands. What have you tried so far and where are you stuck
|
[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
|
 |
fred rosenberger
lowercase baba
Bartender
Joined: Oct 02, 2003
Posts: 9948
|
|
I am not a regex guru. I have no idea how to do this with a regex...but I could probably do it with two.
|
Never ascribe to malice that which can be adequately explained by stupidity.
|
 |
 |
|
|
subject: Regular expression required
|
|
|