Skip to content

Commit 348587f

Browse files
committed
Updated Python's RegEx
1 parent a43fbe7 commit 348587f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

urlValidator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import re
22

33
def validateURL(url):
4-
regex = "((http|https)://)(www.)?[a-zA-Z0-9@:%._\\+~#?&//=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%._\\+~#?&//=]*)"
4+
regex = "((http|https)://)(www.)?[-a-zA-Z0-9@:%._\\+~#?&//=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%._\\+~#?&//=]*)"
55
r = re.compile(regex)
66

77
if(re.search(r, url)):

0 commit comments

Comments
 (0)