Regular Expressions 101

Community Patterns

Polynom

1

Regular Expression
PCRE (PHP <7.3)

/
(?P<koef>[+-]?\d*)(?P<literals>(?:[a-z](?:\^-?\d+)?)+)
/
g

Description

Regex to get polynomial coefficients

Submitted by Balandin Igor - 2 years ago