How to port this regular expression from JavaScript

Thanks! Looks good, but too simple for my case (doesn’t support urls with http://, internationalized domain names, etc).