splitting a string with regex in java

Solutions on MaxInterview for splitting a string with regex in java by the best coders in the world

showing results for - "splitting a string with regex in java"
Giovanni
23 Jun 2018
1    String current_url = "https://{domain name}/{type of data}/4583236-{name-of-perpetrators}";
2    String[] urlParts = current_url.split("type of data}/");
3    String mySuburl = urlParts[1];
4    String[] suburl = mySuburl.split("-{name-of-perpetrators");
5    String mytext = suburl[0];
6    System.out.println(mytext);
7