public class Main {
/**
* @param args
*/
public static void main(String[] args) {
String url="http://a.b.com/m/test/index";
System.out.println(url.replaceAll("^.*?((?<!/)(?:/)(?!/))", ""));
}
}
The system print is: m/test/index
.
But in my mind it should print is:/m/test/index
. Somebody give some reason?