Regular Expressions 101

Community Patterns

normalize-space

0

Regular Expression
Python

r"
(?=(?:[^'\"]*(?:'|\")[^'\"]*(?:'|\"))*[^'\"]*$)\s+
"
gx

Description

Remove extra space in between text, but not in quoted text

Submitted by anonymous - 4 years ago