Regular Expressions 101

Community Library

Community Library Entry

1

Regular ExpressionOpen Workspace

"
^\d{1,3}(?:\.\d{3})*(?:,\d+)?$|^\d+(?:,)?\d+$
"
gm

Description
Created·2021-03-12 23:31
Updated·2021-03-14 17:43
Type·Match
Flavor·Java

A regex for validating decimal numbers in the European number format (in many parts of Europe at least, including Germany). A comma is used as a separator for the decimal number, a dot as a separator for thousand places.

Submitted by Florian Drees
Open Workspace