Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
r"
^(?:[^:\n]+://)?[^/\n]+(?:(?:/[^/\n]+)*?/[^/.\n]+)?$
"
gm
Input 1
1
New
www.mysite.com http://www.example.com www.mysite.com/page http://www.mysite.com/doc1/doc2/page http://www.mysite.com/page/ http://www.mysite.com/dir1/dir2/file.php http://www.mysite.com/file.jpg www.mysite.com/file.html www.mysite.com/file.doc
Extraction