Hello,
I have one line of Java and regular expression that I got from the web :
If "line" contains :
this code would give me :
which is almost what I would like to do except for the double quotes. I wonder if someone could please help me change the regular expression so that it would return :
Thank you and Best Regards,
Akino
I have one line of Java and regular expression that I got from the web :
Code:
String[] opt;
opt = line.split("\\s+(?=([^\"]*\"[^\"]*\")*[^\"]*$)");
1 "Hello World"this code would give me :
opt[0] : 1
opt[1] : "Hello World"which is almost what I would like to do except for the double quotes. I wonder if someone could please help me change the regular expression so that it would return :
opt[0] : 1
opt[1] : Hello WorldThank you and Best Regards,
Akino