Regular Expressions 101

Community Patterns

LaTeX - Nonspaced operators

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 - 8 years ago