Regular Expressions 101

Community Patterns

Code Space Remover

1

Regular Expression
PCRE (PHP <7.3)

/
[><{}()\[\]=+\-*\/!,:;"' \n\t]([ \n\t])[><{}()\[\]=+\-*\/!,:;"' \n\ta-zA-Z0-9]|[><{}()\[\]=+\-*\/!,:;"' \n\ta-zA-Z0-9]([ \n\t])[><{}()\[\]=+\-*\/!,:;"' \n\t]
/

Description

Mathces unnecessary spaces in computer programs.

Submitted by Loovjo - 9 years ago