Community Patterns

Community Library Entry

2

Regular Expression
Created·2021-03-13 14:23
Flavor·Java

"
^\d*\s*[!<>=](?>\=)?\s*\d+$|^\d*\s*<>\d+
"
gm
Open regex in editor

Description

Regex expression for comparing decimal numbers with the usual comparison operators such as < (less than), <= (less than or equal to), > (greater than), >= (greater than or equal to), != (not equal to), == (equal to), ...

The regex also allows filtering of data from e.g. a database, whereby the first value is not needed, e.g. [FIELD] < 100

Submitted by Florian Drees