Community Patterns

Community Library Entry

4

Regular Expression
Created·2015-07-01 19:50
Flavor·Python

r"
(?:^\s*([+-])?|\s*(?<![+-])([+-]))\s*(?:(\d+(?:\.\d*)?)\s*\*)?\s*(?<![+-])([+-])?(\d+(?:\.\d*)?)?([xX])?(?:\^(\d+))?\s*
"
g
Open regex in editor

Description

use this to get value of any side of an equation. You can combine this with https://regex101.com/r/fH5kJ1/1

Submitted by Kerosene2000