Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
[+\-]?[^\w]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)
"
gm

Description

Works for both positive and negative exponent Works for both lowercase exponent (e) and uppercase exponent (E)

Submitted by anonymous - 5 years ago