Regex · Extra whitespace · Free
Extra whitespace regex.
Matches runs of two or more whitespace characters — handy for collapsing spacing. Copy the pattern below, see what it matches, then tweak it for your exact case with the free generator.
The pattern
/\s{2,}/g
✓ Matches
a bline\t\tendx y✗ Doesn't match
a bsingleno-spaceNeed a variation? Generate one
Other common patterns
Parsing and pattern-matching are everywhere in AI systems. MindloomHQ teaches you to build them for real — agents, RAG, pipelines — with projects and certificates.
Explore MindloomHQ →