Basically I have these connection strings that I need to split up, heres an example of one:
name=type,info1;101;localhost;-1;false;false
I want to split it up into three variables: name, type and info.
the name is the bit before the '=' ("name") the type is the bit after the '=' and before the ',' ("type") the info is everything after the ',' ("info1;101;localhost;-1;false;false")
I have tried using the ".split" function but to no avail. Could anybody help me do it using a regular expression with substrings? Thanks.
Not had much practise with the split function, so it went like this:
String name [] = connString.split(",");
String type [] = connString.split(";");
String info [] = connString.split("");
MORE:
could you use the '.split' method to split up the parameters in this line from an XML doc?
<rect x="298.43" width="340.00" y="131.12" height="380.00" id="rect_1" style="stroke-width: 1; stroke: rgb(0, 0, 0); fill: rgb(255, 102, 0); "/>