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
^[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 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 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 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 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
\d[\d,]*(?:\.\d+)?
Description
Decimal number. From http://tools.twainscanning.com/getmyregex
Matches
1,128.09
Non-Matches
128F
Author Rating: Not yet rated. RobertKaw
Title Test Details Positive Decimals with optional leading/trailing zeros
Expression
^[+]?((\d*[1-9]+\d*\.?\d*)|(\d*\.\d*[1-9]+\d*))$
Description
Matches any positive decimal number > 0 with optional leading '+' symbol and optional leading or trailing zeros on both sides of the decimal point. Decimal point is also optional and either side of the decimal is optional.
Matches
010 | 010. | .010 | 010.010
Non-Matches
. | 0 | 0. | .0 | 0.0 | 0.00 | 00.0 | 00.00 | -0 | -1 | a
Author Rating: The rating for this expression. Glen Thompson
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 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
^\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 Parttern Tittle
Expression
^\d(\.\d{1,2})?$
Description
this parttern only use for decimal number.
Matches
123 | 123.00 | 123.99
Non-Matches
123.999
Author Rating: Not yet rated. Hoang Bui Thanh
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 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 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 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 Divisibility by 3
Expression
((?=[^147]*([147][^147]*[147][^147]*[147][^147]*)*$)[^258]*([258][^258]*[258][^258]*[258][^258]*)*)|((?=[^147]*([147][^147]*[147][^147]*[147][^147]*)*[147][^147]*$)[^258]*([258][^258]*[258][^258]*[258][^258]*)*[258][^258]*)|((?=[^147]*([147][^147]*[147][^147]*[147][^147]*)*[147][^147]*[147][^147]*$)[^258]*([258][^258]*[258][^258]*[258][^258]*)*[258][^258]*[258][^258]*)
Description
Matches decimal numbers that are divisible by 3. :-)
Matches
18|999|176826
Non-Matches
19|998|176827
Author Rating: Not yet rated. Hans-Peter Störr
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 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 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 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
Change page:   |    Displaying page 1 of 2 pages; Items 1 to 20

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