Java tutorial
//package com.java2s; public class Main { public static String getPort(String str) { String port; String s = str.substring(7); String[] arrayStr = s.split(":"); String temp = arrayStr[1]; String[] temp0 = temp.split("/"); port = temp0[0]; return port; } }