Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
^(((-?\d*(,\d+)?\*?)|\d+\/\d+)?(x(\^-?\d+)?)?)((\+|-)(((-?\d*(,\d+)?\*?)|\d+\/\d+)?(x(\^-?\d+)?)?))*$
/

Description

Matches every polynomial you want ;)

Submitted by Stefan Baumann - 9 years ago