Regular Expressions 101

Community Patterns

Community Library Entry

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