Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Created·2020-01-09 11:39
Flavor·ECMAScript (JavaScript)

/
[-]?[0-9]+[,.]?[0-9]*([\/][0-9]+[,.]?[0-9]*)*
/
gm
Open regex in editor

Description

Matches integer numbers, floats and fractions of floats. I.e. "2", "-3.456", "3/4", "2.1/8".

Submitted by anonymous