Hi i will have URL in following format:
- http://www.youtube.com/v/0PsnoiwMrhA
- https://www.youtube.com/v/0PsnoiwMrhA
- www.youtube.com/v/0PsnoiwMrhA
- http://youtube.com/v/0PsnoiwMrhA
- youtube.com/v/0PsnoiwMrhA
It all must capture and return a domain name as youtube
.
I have tried using
(http://|https://)?(www.)(.?*)(.com|.org|.info|.org|.net|.mobi)
but it showing error as regex parsing nested quantifier
.
Please help me out