Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(\$[^\n$]*[^\s$])(-|=|\+)([^\s$][^\n$]*\$)
/
g

Description

Find nonspaced operators with capturing groups to reformat correctly.

Submitted by Dave - 9 years ago