Hi,
I am trying to derive just the domain name from a URL with a regex (No backreferences available as this is in Javascript), but cannot get it to work, I always capture a / in front of my string, so I get /www.johnlewis.com. Can anyone help?
Thanks!
I am trying to derive just the domain name from a URL with a regex (No backreferences available as this is in Javascript), but cannot get it to work, I always capture a / in front of my string, so I get /www.johnlewis.com. Can anyone help?
PHP:
[^\w*:\/]?\/[\-a-z\.]+
http://www.johnlewis.com/370705/Product.aspx
Thanks!