How to find a url pattern in java using regex
===

I want to find out if a given string (that represent a url) is from the same sub domain.
For example, http://www.myDomain.com/someThing with the combination of myDomain.com will return true. So will the following:

http://myDomain.com; http://www.domain.myDomain.com;

But the next (illeagal) url will not - 'http://.myDomain.com' (note the dot before myDomain)

Basically, I need a regex that represent whatever before myDomain.com - which in general needs to be (http|https)://[a-z.]*myDomain* - which mean that just before myDomain.com there might be letters followed by dot (0 or more times) - but if there are no letters, there shouldn't be dot as well.

Does anyone know how to assemble that regex?

Thanks.