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 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
   Displaying page 1 of 1 pages; Items 1 to 1

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