N
Nishi Bhonsle
Hi:
I have a string that I want to split at the first occurence of "$"
Ex -->
String actStr = "/xx/ssdasdasd/asds/sdsdsd/sdsd$bjSt=d7b7cb90$sdsdsd=emtests2.<hostname>$type=sdasdsad$ctxType1=asdasdasd_sdasd";
String[] act2Str = new String[200];
String regex = "$";
for (int i = 0; i < act2.length; i++) {
act2 = actStr.split(regex,1);} //act2[] should contain "$bjSt=d7b7cb90$sdsdsd=emtests2.<hostname>$type=sdasdsad$ctxType1=asdasdasd_sdasd"
But I get an error at the split method when I try to compile this?
What could be the issue?
Thanks.
I have a string that I want to split at the first occurence of "$"
Ex -->
String actStr = "/xx/ssdasdasd/asds/sdsdsd/sdsd$bjSt=d7b7cb90$sdsdsd=emtests2.<hostname>$type=sdasdsad$ctxType1=asdasdasd_sdasd";
String[] act2Str = new String[200];
String regex = "$";
for (int i = 0; i < act2.length; i++) {
act2 = actStr.split(regex,1);} //act2[] should contain "$bjSt=d7b7cb90$sdsdsd=emtests2.<hostname>$type=sdasdsad$ctxType1=asdasdasd_sdasd"
But I get an error at the split method when I try to compile this?
What could be the issue?
Thanks.