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
获取导入的模块相对路径
Open Workspace
JavaScript
Match
Created 2021-06-10 11:06
0
Regular Expression
/
(?<=
\W
(
from
|
import
|
require
\(
|
require
\.
context
\(
|
import
\(
)
\s
*
)
[
'"`
]
(
(
\.
+
|
src
)
\/
.
+?
)
[
'"$`
]
/
g
Description
获取导入的模块相对路径
Submitted by
高乐天