Matching decimals in european format (dot as grouping separator, comma as decimal separator)

Published on Tue Mar 01 2022

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.

Additional matching regexes for
Matching decimals in european format (dot as grouping separator, comma as decimal separator)

Matching decimals in european format (dot as grouping separator, comma as decimal separator)

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.

Number 0-100, 2 decimals

A number between 0 and 100 (including them) with up to two decimals. The decimal separator can be . or , . Usefull for percentage.

Signed numbers with optional decimal part (comma or dot)

Signed numbers with optional decimal part (comma or dot)

Select any decimal

With this pattern possible select decimal that cantain comma or space

Valid RGB color value

Pattern for matching actually valid RGB values. - validate separator (mixing spaces and commas between values is not valid) - validate if comma is used as separator if alpha channel is set - validate units (mixing percentage with integers is not valid) - extract `r`, `g`, `b`, `a`, `separator` and `unit` with named groups

Simple Number

Verifies Number is a negative/positive number. Number may be a decimal, but if it is, it requires at least one number before and after the decimal place. Decimal numbers may also be negative or positive. Only 1 decimal place is allowed.

Regular expression for matching parenthesis, two words and comma

Regular expression for matching parenthesis, two words and comma

Basic Phone Number Matching

Basic Phone Number Matching

Regex for real number

this regex can detect any real number whether it is signed or unsigned.plus it can detect real number both with and without floating point aka '.'.the numbers should be decimal number

whitespaces and positive numerics (3 precisions accpet . or ,)

//Accepts whitespaces and positive numeric values including integers and decimals(dot or comma optional) with 3 precisions only. //Ex: "999", " 999.999", " 999.999", " 999,999", " 999,999" -> ACCEPTABLE