Regular Expressions 101

Community Patterns

Polynomial spotter

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(\d*)(?:X|x)(?:\^(-?\d))?
/
g

Description

spots polynomial pieces and captures the exponent and coefficient

Submitted by anonymous - a year ago