Community Patterns

Community Library Entry

1

Regular Expression
Created·2021-03-12 23:31
Updated·2021-03-14 17:43
Flavor·Java

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

Description

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