Regex for VS Code and IDE Search/Capture ES import path

Find JavaScript/TypeScript imports and capture the module path.

Section: JetBrains IDE Recipes

Capture ES import path

regex
regex
import\s+.*?\s+from\s+['"]([^'"]+)['"]
Explanation

Useful for auditing imports or bulk edits.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing JetBrains IDE Recipes
Find className/class attributes
Capture HTML or JSX class-like attributes.
OpenIn sheetregexsame section
Find numbered file suffixes
Capture numeric suffixes in filenames or keys.
OpenIn sheetregexsame section
Find CommonJS require calls
Find CommonJS imports for migration to ESM.
OpenIn sheetregex1 tag match
Enable regex mode in search
Use regex search in VS Code find/replace.
Find simple `var` declarations
Find `var` declarations for modernization review.
Add commas to object properties
Find non-final object property lines missing a comma.