I want output "xyz" instead of "www.xyz.com". Mainly I asked this because I wanted to know how to extract something in between the pattern except the pattern itself.
public class Test {
public static void main(String[] args) {
Pattern p = Pattern.compile("www[.].+[.]com");
Matcher m = p.matcher("www.xyz.com");
if(m.find()){
System.out.println(m.group());
}
in.close();
}
}