Regex for VS Code and IDE Search/Find numbered file suffixes

Capture numeric suffixes in filenames or keys.

Section: JetBrains IDE Recipes

Find numbered file suffixes

regex
regex
([._-])(\d+)(?=\.[A-Za-z0-9]+$|\b)
Explanation

Useful when normalizing artifact names.

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
Capture ES import path
Find JavaScript/TypeScript imports and capture the module path.
OpenIn sheetregexsame section
Find className/class attributes
Capture HTML or JSX class-like attributes.
OpenIn sheetregexsame section
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.
Find CommonJS require calls
Find CommonJS imports for migration to ESM.