Decimal(18,2) Regular Expression
-
\d{1,18}\.?\d{0,2} At a guess.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
^[-]?([1-9]{1}[0-9]{0,}(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|\.[0-9]{1,2})$ This regular expression will match on a real / decimal / floating point / numeric string with no more than 2 digits past the decimal. The negative sign (-) is allowed. No leading zeroes or commas or use the following link: http://regexlib.com for further search
-
^[-]?([1-9]{1}[0-9]{0,}(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|\.[0-9]{1,2})$ This regular expression will match on a real / decimal / floating point / numeric string with no more than 2 digits past the decimal. The negative sign (-) is allowed. No leading zeroes or commas or use the following link: http://regexlib.com for further search
-
Will it be restricting the value to maximum 16 digits before decimal? -- modified at 5:16 Monday 22nd October, 2007
Bye
the previous one will not... try this one : ^[-]?([1-9]{1,18}[0-9]{0,}(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|\.[0-9]{1,2})$
-
Will it be restricting the value to maximum 16 digits before decimal? -- modified at 5:16 Monday 22nd October, 2007
Bye
"\d{0,18}\.?\d{0,2}"
Best Regards, Chetan Patel
-
"\d{0,18}\.?\d{0,2}"
Best Regards, Chetan Patel