Need help parsing...
In my code, I have a method that returns url.getHost();. But the results of that can be blarg.com, or sometimes dates.blarg.com. I want to retur
String host = url.getHost(); Matcher m = Pattern.compile("^.+[.]([^.]+[.][^.]+)$").matcher(host); if(m.matches()) { host = m.group(1); }