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

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 2
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 List of digits, CSV
Expression
^(\d{4},?)+$
Description
Accepts a list of 4 digits separated by commas. Used to validate a list of years. Can be easily customized to change the number of digits.
Matches
2001,2002,2003 | 1999 | 1999,2000,
Non-Matches
123 | 1234,e,1234 | 1234, 1234,1234
Author Rating: The rating for this expression. Luc Boudreau
   Displaying page 1 of 1 pages; Items 1 to 2

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