From 3da5aba62a4cce911f34e15449e0367257bd8c44 Mon Sep 17 00:00:00 2001 From: Yury Shkoda Date: Tue, 8 Sep 2020 16:07:02 +0300 Subject: [PATCH] fix: removed unnecessary check for www subdomain --- src/utils/isUrl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/isUrl.ts b/src/utils/isUrl.ts index 7d686f9..1e64fa7 100644 --- a/src/utils/isUrl.ts +++ b/src/utils/isUrl.ts @@ -1,6 +1,6 @@ export const isUrl = (url: string): boolean => { const pattern = new RegExp( - '^(http://www.|https://www.|http://|https://)[a-z0-9]+([-.]{1}[a-z0-9]+)*.[a-z]{2,5}(:[0-9]{1,5})?(/.*)?$', + '^(http://|https://)[a-z0-9]+([-.]{1}[a-z0-9]+)*.[a-z]{2,5}(:[0-9]{1,5})?(/.*)?$', 'gi' )