Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
(?<=\W(from|import|require\(|require\.context\(|import\()\s*)['"`]((\.+|src)\/.+?)['"$`]
/
g

Description

获取导入的模块相对路径

Submitted by 高乐天 - 4 years ago