Answers for "Splitting a string with regex in java"

0

Splitting a string with regex in java

String current_url = "https://{domain name}/{type of data}/4583236-{name-of-perpetrators}";
    String[] urlParts = current_url.split("type of data}/");
    String mySuburl = urlParts[1];
    String[] suburl = mySuburl.split("-{name-of-perpetrators");
    String mytext = suburl[0];
    System.out.println(mytext);
Posted by: Guest on May-27-2021

Code answers related to "Splitting a string with regex in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language