I'm trying to catch email adresses and urls such as "www.house22.com" or "info@house22.com".
For the moment, I've got the following regex:
$r['QurlA'] = '/^(.*)(?<!\pL)
(?<QurlA>(?:[a-z]{2,}:\/\/)(?:\w+(?::\w+)?@)?(?:[a-z_-]+[.])+[a-z]{2,}(?::\d+)?(?:\/(?:\S*))?)(?<![.])
(?<_>\s*)(.*)$/uxi';
$r['QurlB'] = '/^(.*)(?<![\pL.\/\\\\@-])
(?<QurlB>(?:\S+:\S*@)?(?:[a-zA-Z][a-z_-]+[.])+[a-z]{1,}(?:\/(?:\S*))?)(?<![.])(?![\pL@(+-]|[.]\S)
(?<_>\s*)(.*)$/ux';
URLs without digits work very well, so "www.house.com" or "info@house.com" are found without any problem. But with the digits at the end, the URL can not be recognized. Why is this? Does anybody see my faut?
Thank you very much!