RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Advanced Search

Keywords

Category

Minimum Rating

Results per Page

Search Results: 25 regular expressions found.

Change page:   |    Displaying page 1 of 2 pages; Items 1 to 20
Title Test Details Pattern Title
Expression
^\d*\.?((25)|(50)|(5)|(75)|(0)|(00))?$
Description
This is a pattern to search and verify that a decimal number ends with a 25, 50, 75, 0 or 00. It does match for a nothing after decimal also but I guess thats ok !!
Matches
0.25 | .75 | 123.50
Non-Matches
.77 | 1.435
Author Rating: The rating for this expression. narsi v
Title Test Details Pattern Title
Expression
^[+-]?([0-9]*\.?[0-9]+|[0-9]+\.?[0-9]*)([eE][+-]?[0-9]+)?$
Description
A regular expression that matches numbers. Integers or decimal numbers with or without the exponential form.
Matches
23 | -17.e23 | +.23e+2
Non-Matches
+.e2 | 23.17.5 | 10e2.0
Author Rating: The rating for this expression. Erik Pettersson
Title Test Details Pattern Title
Expression
^\d*[0-9](|.\d*[0-9]|,\d*[0-9])?$
Description
This is permit all decimal number, exclude all alphanumeric caracter
Matches
123456.123456 | 123456,123456 | 123456
Non-Matches
123a.123 | 123a,123 | a
Author Rating: Not yet rated. Hugues Gauthier
Title Test Details Pattern Title
Expression
^\s*(((\d*\.?\d*[0-9]+\d*)|([0-9]+\d*\.\d*) )\s*[xX]\s*){2}((\d*\.?\d*[0-9]+\d*)|([0-9]+\d*\.\d*))\s*$
Description
This validates Length times Width times Height measurements, which consists of 3 whole or decimal numbers separated by an x.
Matches
1.1 x 4.35 x 5.0 | 1 x 2 x 3 | 4.75 x 300.25 x 0
Non-Matches
z.56 x 6 x 7 | 1 xx 2 x 3 | 1 by 2 by 3
Author Rating: Not yet rated. Rod Early
Title Test Details Pattern Title
Expression
(?=([\W]*[\w][\W]*\b))\s(?=\d\.|\d\b)
Description
This RegExp matches a space (" ") character with lookahead condition if there is an ASCII text in front of it and it is followed by a single decimal number which in turn is followed by a dot or nothing. It's useful to seperate scientific notation numbers from a text, i.e. when classifying with the bow toolkit. [EDIT 18.09.2004] There was indeed an error in the second lookahead. Changed |\b to |\d\b
Matches
ROOT 4.873624764e-34 | `1234567 890-= 3.8765e-34543 | ~! @ # $ % ^ & ( % )_+ 3.345e-2384754
Non-Matches
rstuvwxyz 754.234e-23 | yz754.234e-23 | yz .234e-23
Author Rating: The rating for this expression. Benjamin J. J. Voigt
Title Test Details Pattern Title
Expression
^\d*\d?((5)|(0))\.?((0)|(00))?$
Description
Based on a pattern I found on this site, this pattern verifies that a number is a multiple of 5. Basically checks the last number before the decimal point to see if it's a 5 or 0. Also works on non-decimal numbers. Thanks to Narsi V for the base pattern http://www.regxlib.com/REDetails.aspx?regexp_id=82
Matches
15.00 | 20 | 200.00
Non-Matches
23.00 | 12 | 50.80
Author Rating: Not yet rated. Adam Weber
Title Test Details Pattern Title
Expression
^[0-9]*(\.)?[0-9]+$
Description
it will check for the +ve decimal numbers
Matches
1 | 123 | 132.132
Non-Matches
1.2.2 | -123
Author Rating: The rating for this expression. himraj love
Title Test Details Decimal number
Expression
^[\+\-]?[0-9]+([\,\.][0-9]+)?$
Description
Accepts integer and decimal numbers, the decimal delimiter beeing either a point or a comma, prefixed or not by a plus or minus sign.
Matches
«1» «-1» «+1» «1.0» «-1.0» «+1.0» «1,0» «-1,0» «+1,0»
Non-Matches
«abc» «1e2»
Author Rating: Not yet rated. Luc Boudreau
Title Test Details Decimal numbers
Expression
^[+-]?\d+(\.\d{1,4})? *%?$
Description
An expression for .NET regular expression validation controls intended to facilitate the entry of percentage values both a whole numbers or as their decimal representations. Also compatible with the default US format for string formatting for percentages. Recommend that if you intended accept a value passing this express that you strip the percentage signs and take measures to ensure that any whole values are converted to percentages.
Matches
123 | 256.89 | 2% | 0.2% | 25% | 0.1 | 0 | +1.9% | -2
Non-Matches
.1 | %1 | 1.0 | 2,345
Author Rating: The rating for this expression. Mirza Muhammad Saleem
Title Test Details Dollar Currency Pattern
Expression
^(([1-9]\d{0,2}(\,\d{3})*|([1-9]\d*))(\.\d{2})?)|([0]\.(([0][1-9])|([1-9]\d)))$
Description
Building on Joe Lynwood's Regex which makes use of a combination of Michael Ash's US Dollar amount and Bri Gipson's eliminating zero input, I've added support for values between 0 and 1. Being relatively new to regex, I hope someone would be able to spot any discrepancies with the code and its supposed function. Edit 1: Corrected mis-match with non-decimal numbers.
Matches
1,234,567.89 | 1234567.89 | 9.99 | 0.34 | 0.10 | 1234
Non-Matches
1,2345,67.89 | 1234,345,678.0 | 0 | 0.00 | 123. | .123
Author Rating: The rating for this expression. Fong C.D.
Title Test Details Colon-delimited string of positive integers and/or decimal numbers
Expression
^(([1-9][0-9]*)|((([0])|([1-9][0-9]*))\.[0-9]+)|((([1-9][0-9]*)|((([0])|([1-9][0-9]*))\.[0-9]+))\:)*(([1-9][0-9]*)|((([0])|([1-9][0-9]*))\.[0-9]+)))$
Description
Accepts a colon-delimited string of positive integers and/or decimal numbers in any combination. Spaces are not permitted. Decimal numbers of less than 1 must be prefixed with a zero (e.g. accepts 0.1, but not .1), and numbers with a trailing decimal point are not accepted (e.g. accepts 3.0, but not 3.). A lone zero is not accpeted (e.g. accepts 1.02:3:4.5, but not 1.02:0:4.5). Developed from a similar expression by Steven Smith on this site.
Matches
1.2 | 0.1:0.5:56:6.70 | 3:6.78954:1:2:3
Non-Matches
0.1:.5:56 | -6.70:3. | 5: 0.1:0
Author Rating: Not yet rated. Phil Heneghan
Title Test Details Real Float Number
Expression
[+-]?+(?>\d++\.?+\d*+|\d*+\.?+\d++)
Description
This regex is designed to fail fast (using possessive quantifiers) while still matching a floating decimal number all the time. Won't match scientific notation or fractions. Can be combined with other patterns. Note: This site's tester does not support them. If your language does not support possessive quantifiers try the following: (?>[+-]?)(?>(?>\d+)(?>\.?)(?>\d*)|(?>\d*)(?>\.?)(?>\d+))
Matches
+7 | -7.7 | .7 | 7. | etc
Non-Matches
1/7 | 7e10
Author Rating: The rating for this expression. Trinithis
Title Test Details Multiples of 0.5
Expression
(^\d{1,3}$)|(\d{1,3})\.?(\d{0,0}[0,5])
Description
This is used to match the values that are multiples of 0.5 upto single digit decimal number.
Matches
444.5 | 444 | 1 | 2 | 3 | 3.5
Non-Matches
444.6 | 444.09 | 444.999
Author Rating: Not yet rated. Siva Krishna
Title Test Details Decimal number with 2 digits after comma
Expression
^[+-]?\d+(\,\d{2})? *?$
Description
This regex accepts decimal number with exactly 2 numbers after comma and without point.
Matches
0,00 0,99 -99,99 999999 -9 0 999999999,99
Non-Matches
9,9 0,0
Author Rating: Not yet rated. jose
Title Test Details Metric and Time Dimensions
Expression
(?<Nbr>[\+-]?((\d*\,\d+)|(\d*\.\d+)|\d+))\s*(?<Unit>mm|cm|dm|min|km|s|m|h)
Description
Matches decimal numbers (english or german writing) followed by metric or time units (mm, cm, dm, m, km, s, min and h) in labels surrounded by any digit.
Matches
345,3m, 345.m, 345m, 345,5 m
Non-Matches
abc, ABC, 0-9
Author Rating: The rating for this expression. Thomas Pietsch
Title Test Details Decimal Number
Expression
^([1-9]([0-9])?)(\.(([0])?|([1-9])?|[1]([0-1])?)?)?$
Description
Expression to match decimal number with 2 digits.
Matches
1.0, 1.1 .. 1.11 ... 99.0, 99.1, 99.2, ... 99.11
Non-Matches
0, 0.0. 0.11, 99.12, 1.12, 100, 100.11
Author Rating: The rating for this expression. Girish Yepuri
Title Test Details Decimals with optional positive/negative sign, miles separator (,) and exponential notation
Expression
/^[-+]?((\d*|((\d{1,3})?,(\d{3},)*(\d{3})))?)(\.\d*)?([eE][-+]\d+)?$/
Description
Valids decimal numbers with optional support for: 1.- Use a positive/negative sign (123.78 -123.09 +0.123 are valid) 2.- Use a miles separator (12345.789 12,345.099 +12,345 are valid) 2.- Use a exponential notation (+0.123E+4 -12.345e-4 are valid)
Matches
123.78 -123.09 +0.123 12345.789 12,345.099 +0.123E+4
Non-Matches
56,88 12e3 09,98.99
Author Rating: Not yet rated. Jose Antonio Gonzalez Prieto
Title Test Details Decimal Number
Expression
^[+-]?\d*(([,.]\d{3})+)?([,.]\d+)?([eE][+-]?\d+)?$
Description
Matches any integer or decimal number with either dot (.) or comma (,) as decimal- and thousands-separator. Also accepts Scientific notation.
Matches
-4,233.2832e12 | +232 | -0.12e-5
Non-Matches
abc | @41 | 0x423
Author Rating: The rating for this expression. jteeuwen
Title Test Details CIDR notation (subnet)
Expression
/^(([01]?\d?\d|2[0-4]\d|25[0-5])\.){3}([01]?\d?\d|2[0-4]\d|25[0-5])\/(\d{1}|[0-2]{1}\d{1}|3[0-2])$/
Description
Validates subnet specified by CIDR notation. A valid CIDR notation begins with the IP address followed by a '/' character and a decimal number specifying the length, in bits, of the subnet mask or routing prefix (number from 0 to 32).
Matches
192.168.100.1/24 | 0.0.0.0/0
Non-Matches
192.168.100.1/33 | 0.0.0.0/90
Author Rating: The rating for this expression. Eugene Kardash
Title Test Details Decimal Number
Expression
^\s*(?<sign>[+-]?)(?:0*?)(?<abs_value>(?:(?:[1-9]\d*)|0)?(?:(?<=\d)\.|\.(?=\d))(?:(?:(?:\d*[1-9])|0)?)?|(?:(?:[1-9]\d*)|0)?)(?:0*)\s*$
Description
Parses a decimal number. returns two match groups <sign> and <abs_value>. Accepts empty string.
Matches
0 | 00 | 000 | 0001 | 01 | 10 | 1000 | .0 | 0. | 0.0 | 00.0 | 0.00 | 0.0000 | 000.0 | 0.11000 | 00011.000 | 1.2 | 0.5 | 00.05 | 1 | -5 | -.8 | +9. | -00012.033000 |
Non-Matches
. | 0.1e+1 | 1e-2
Author Rating: Not yet rated. Mihail Poltorihin
Change page:   |    Displaying page 1 of 2 pages; Items 1 to 20

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials