From 91593b04fec9ca2e8d574672cb3d487dfa37a44b Mon Sep 17 00:00:00 2001 From: Juan Gilsanz Polo Date: Mon, 24 Jun 2024 18:43:01 +0200 Subject: [PATCH] Changed url without protocol regexp --- lib/constants/regexp.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/constants/regexp.dart b/lib/constants/regexp.dart index f7db95a..dded282 100644 --- a/lib/constants/regexp.dart +++ b/lib/constants/regexp.dart @@ -2,7 +2,7 @@ class Regexps { static final url = RegExp(r'/https?:\/\/(?:www\.)?([-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b)*(\/[\/\d\w\.-]*)*(?:[\?])*(.+)*/gi'); static final urlWithoutProtocol = - RegExp(r'[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)'); + RegExp(r'[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]+\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)'); static final ipAddress = RegExp(r'^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)(\.(?!$)|$)){4}$'); static final domain = RegExp(r'^(([a-z0-9|-]+\.)*[a-z0-9|-]+\.[a-z]+)$'); static final path = RegExp(r'^\/\b([A-Za-z0-9_\-~/]*)[^\/|\.|\:]$');