Introduction
Here is the source code for Main.java
Source
//package com.java2s;
public class Main {
public static String getHost(final String s) {
if (s.contains("://")) {
final String[] split = s.split("://");
if (split.length > 1) {
return split[1].split("\\?")[0];
}
}
return null;
}
}