regexmatch.dev
Explore
Open main menu
Save & Share
Facebook
Twitter
Tumblr
E-Mail
Pinterest
LinkedIn
Reddit
Number 0-100, 2 decimals
Published on Tue Mar 01 2022
A number between 0 and 100 (including them) with up to two decimals. The decimal separator can be . or , . Usefull for percentage.
Regex
Test String
Additional matching regexes for
Number 0-100, 2 decimals
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.
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.
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.
Test numeric input to be between 0,01 and 100,00
Tests a numeric input to be between 0,00 < input <= 100,00. Decimals are optional but have at max 2 places.
HSL(A) Color Matching
This allows for both hsl and hsla color patterns to be matched. `hsla(50.5deg, .531%, .9%, 1.0)` - The hue can be matched without the word `deg`. - Hue is from 0-360 - Percentage allows for decimals. - Percentage is from 0-100% - Alpha is from 0.0-1.0
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
Decimal (with dot)
Decimal with a dot, if has a dot it needs a number following it
Any number between 0 and 10 with 0 or 1 decimal places
Matches any number between 0 and 10 (inclusive) with 0 or 1 decimal places. Note that .5 will NOT be matched but 0.5 will. Also 10.X will not be matched, but 10 will.
number separator positions
finds the positions in a number to be replaced with a thousands separator, e.g. 12345 => 12`345