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 1
Title Test Details Pattern Title
Expression
^0$|^[1-9][0-9]*$|^[1-9][0-9]{0,2}(,[0-9]{3})$
Description
I need a pattern to match the whole number / integer (0-99999...), but also allow users to put comma in the thousand positions. This is what I got.
Matches
1234 | 0 | 12,345
Non-Matches
12,3245 | -1 | 1234.23
Author Rating: The rating for this expression. Harry Chou
   Displaying page 1 of 1 pages; Items 1 to 1

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