From c7a3ad1d6b81dd28504d65d600f28eed7ecae82c Mon Sep 17 00:00:00 2001 From: jalemany1 Date: Mon, 18 Sep 2017 12:23:38 +0200 Subject: [PATCH] feat(url): 'www'-initiated URL extractor --- classes/hypeJunction/Scraper/Extractor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/hypeJunction/Scraper/Extractor.php b/classes/hypeJunction/Scraper/Extractor.php index 5d8802f..84fccb8 100644 --- a/classes/hypeJunction/Scraper/Extractor.php +++ b/classes/hypeJunction/Scraper/Extractor.php @@ -16,7 +16,7 @@ class Extractor { const REGEX_HASHTAG = '(#\w+)'; - const REGEX_URL = '(h?[t|f]??tps*:\/\/[^\s\r\n\t<>"\'\)\(]+)'; + const REGEX_URL = '((h?[t|f]??tps*:\/\/|www)[^\s\r\n\t<>"\'\)\(]+)'; const REGEX_EMAIL = '([\w\-\.]+@[^\s\r\n\t<>"\'\)\(]+\.+[0-9a-z]{2,})';