Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Community Library
How to contribute
x
Matching and Grouping Second Degree Polynomials
Open Workspace
PCRE2 (PHP)
Match
Created 2025-10-22 18:16
0
Regular Expression
/
^
(?:
(
[
-
]
?
\d
*
)
[
x
]
(?:
\^
2
)
)(?:
(?:
\+
(
\d
*
)
[
x
]
)?
|
(?:
(
\-
\d
*
)
[
x
]
)?
)(?:
(?:
\+
(
[
\d
]
)
)?
|
(?:
(
\-
[
\d
]
)
)?
)(?:
(
\=
)
|)(?:
(
0
)
|)
$
/
Description
Matches second-degree polynomials and returns values a, b, c, sign, and 0.
Submitted by
SpiderRocket