VS Code Search and Regex/Replace repeated spaces with one

Normalize spacing.

Section: Replace Cookbook

Replace repeated spaces with one

regex
regex
Find: {2,}
Replace:  

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 Replace Cookbook
Wrap matches in quotes
Surround found words using capture groups.
OpenIn sheetregexsame section
Convert key: value style to quoted keys
Useful when massaging JS-like objects into JSON-like keys.
OpenIn sheetregexsame section
Prefix lines during replace
Insert comment prefix at the beginning of lines.
OpenIn sheetregexsame section
Collapse repeated blank lines
Reduce multiple blank lines to one.
OpenIn sheetregex2 tag match
Replace in current file
Search and replace in the active editor.
OpenIn sheettext1 tag match
Find trailing whitespace
Match spaces at end of lines.
OpenIn sheetregex1 tag match