Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(?<![{a-zA-Z0-9_])[a-zA-Z_][a-zA-Z0-9_]*|[a-zA-Z_][a-zA-Z0-9_]*(?![}a-zA-Z0-9_])
/
g

Description

Get all slug in a math formula not between {}

Submitted by M.BIGOT - 9 years ago