Skip to content Skip to sidebar Skip to footer

How Do I Split The String Of Url Link

how do i split the string on url link StringTokenizer st = new StringTokenizer(linkHref, '.ashx?JobID=');; String community = st.nextToken();

Solution 1:

String s = "http://example.com/GetJob.ashx?JobID=19358502&JobTitle=Factory%20Workers%20in%20Oldham%20-%20Immediate%20Start%20Now&rad=20&rad_units=miles&pp=25&sort=rv.dt.di&vw=b&re=134&setype=2&tjt=factory&where=oldham&pg=1&avsdm=2015-09-10T05%3a54%3a00-05%3a00";

    s = s.substring(s.indexOf("JobID=") + 6);
    s = s.substring(0, s.indexOf("&JobTitle"));
    System.out.println(s);

Post a Comment for "How Do I Split The String Of Url Link"