Regular Expressions 101

Enterprise

Community Library

Your search did not match anything

Community Library Entry

0

Regular ExpressionOpen Workspace

/
^(([+-]?(?:\d*(?:\.(?=\d))?\d+))(?:(?:(?:(?<=\d)[Ee])?((?2)))(?<=\d))?)(?:(?<=\d)[, ](?=\d|[+-]|\.)((?1))[iIjJ])?$
/
g

Description
Created·2017-05-10 10:32
Type·Match
Flavor·PCRE (Legacy)

The regex verifies complex numbers in quite a few mixtures of different floating point representations, with extensive error checking - however, there may be edge cases which i haven't addressed, so feel free to put in more unit tests!

Submitted by Anonymous
Open Workspace