Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Community Library
How to contribute
x
split URL into location-resource-params (JavaScript)
Open Workspace
JavaScript
Match
Created 2014-05-22 17:18
7
Regular Expression
/
(
.
+
)(?:
\/
(
[
\w
\-\.
_
]
+
\.
js
)
)(?:
\?
(
.
+
)
)?
/
gm
Description
Extract resource location, name and query parameters from a URL (JavaScript version)
Submitted by
cebence