Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^\((?P<a>[+-]?\d+)?(?P<sign_x>[+-])?(?P<x>[a-zA-Z])(?P<b>[+-]\d+)\)(?:\^(?P<n>\d*))?$
/
gm

Description

Parse the binomial expression input

Submitted by nil - 3 years ago