got it, but in his case, he has // and not \\
try this:
Code
public class Test {
public static void main (String[] args) {
String test = "https://www.facebook.com/myprofile";
String test2[] = test.split("/");
for (String x : test2) {
System.out.println(x);
}
}
}
and the result will be:
Code
https:
www.facebook.com
myprofile
notice the blank space on index[1] of the array, because the double '/'
This post was edited by ZergOwnZ on Jul 16 2012 07:18am