I need to extract 2 domains from URl. For example, the web-site name is domain.domain2.com -> domain.domain2.com; but m.domain.domain2.com -> domain.domain2.com; also domain.domain2.com/london -> domain.domain2.com. 

I have written an expression `^.+[\\./]([^\\.]+\\.[^\\.]+)$` but it always returns domain2.com. 

What should I add to get the desired result?