Dhiraj Bankar

Greenhorn
+ Follow
since Jan 10, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Dhiraj Bankar

Shailesh Vohra wrote:I am running below code :

String s3 = "ABC$$DEF$$P QR$$XYZ";
String []s2 = s3.split("$$");

for (int i = 0; i < s2.length; i++) {
System.out.println(s2[i]);
}

Here i am using regex : "$$" as a delimiter.
but output i am getting is same as inp String. i.e ABC$$DEF$$P QR$$XYZ

But this is not my desired output.
i want output as
ABC
DEF
P QR
XYZ.

Please help to explain me. also when i use delimiter "|" why do i have to use escape sequence.
String.split("\\|").

you shold try this.



String s3 = "ABC$$DEF$$P QR$$XYZ";
String []s2 = s3.split("\\$\\$");

for (int i = 0; i < s2.length; i++) {
System.out.println(s2[i]);
}

Dear Friends,

I want SCJP 5 coupon from India ... Please It is very urgent...

I need SCJP voucher with validity upto March-2010.
Please inform me at dhirajbankar@gmail.com

Currently I am in Delhi...
Please Please Please Please Please Please

Thanks in advance...
Dhiraj Bankar,
09350546413 / 09971147728
javascript:emoticon('');
14 years ago