.*Toggle the `.*` regex icon in Find or Search. Then use patterns like the examples below.
Regex patterns and search/replace recipes for VS Code, JetBrains IDEs, and common editor refactors.
Regex search patterns for editors and IDEs.
.*Toggle the `.*` regex icon in Find or Search. Then use patterns like the examples below.
^(\s*[A-Za-z_$][\w$]*\s*:\s*.+?)(?<![,{\[])\s*$Useful when cleaning up JS/TS object literals. Verify carefully before replace-all.
"([^"
]*)"Can be replaced with '$1' wrapped in single quotes if the file style requires single quotes.
\bconsole\.log\s*\([^)]*\)\s*;?Useful for cleanup before shipping code.
\b(?:TODO|FIXME|HACK|NOTE)\b.*High-value search for code review and cleanup.
useEffect\s*\(\s*\(\)\s*=>[\s\S]*?\)\s*,\s*\[[^\]]*\]\s*\)VS Code uses a JavaScript-like engine, so `[\s\S]` is a common any-character-across-lines technique.
Common regex patterns for JetBrains Find in Path and Replace.
import\s+.*?\s+from\s+['"]([^'"]+)['"]Useful for auditing imports or bulk edits.
\b(?:class|className)=["']([^"']+)["']Useful for CSS cleanup and component audits.
([._-])(\d+)(?=\.[A-Za-z0-9]+$|\b)Useful when normalizing artifact names.
High-value search-and-replace recipes used during refactors.
^\s*var\s+([A-Za-z_$][\w$]*)Helpful in older JavaScript codebases.
\bconst\s+([A-Za-z_$][\w$]*)\s*=\s*require\((['"][^'"]+['"])\)Useful when converting Node projects to ESM.
(?:\r?
\s*){3,}Good cleanup recipe during formatting passes.
{2,}Useful in prose, YAML, or hand-edited lists.