Click here to Skip to main content
15,892,965 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: regular expession string for whole value or fractional value Pin
Sonia Gupta5-Nov-07 22:35
Sonia Gupta5-Nov-07 22:35 
GeneralRe: regular expession string for whole value or fractional value Pin
Christian Graus5-Nov-07 22:38
protectorChristian Graus5-Nov-07 22:38 
GeneralRe: regular expession string for whole value or fractional value Pin
N a v a n e e t h5-Nov-07 22:41
N a v a n e e t h5-Nov-07 22:41 
GeneralRe: regular expession string for whole value or fractional value Pin
Sonia Gupta5-Nov-07 22:43
Sonia Gupta5-Nov-07 22:43 
GeneralRe: regular expession string for whole value or fractional value Pin
Piyush Vardhan Singh5-Nov-07 22:42
Piyush Vardhan Singh5-Nov-07 22:42 
GeneralRe: regular expession string for whole value or fractional value Pin
Christian Graus5-Nov-07 22:30
protectorChristian Graus5-Nov-07 22:30 
GeneralRe: regular expession string for whole value or fractional value Pin
N a v a n e e t h5-Nov-07 22:37
N a v a n e e t h5-Nov-07 22:37 
GeneralRe: regular expession string for whole value or fractional value Pin
Christian Graus5-Nov-07 22:41
protectorChristian Graus5-Nov-07 22:41 
N a v a n e e t h wrote:
I doubt, will it allow normal digits like 1,2,3.


No, it allows what she wants. A single floating point number. It will not allow .5, it would require 0.5. That's it's only flaw as far as I can see.

N a v a n e e t h wrote:
Then why it's a bad way to go ?


Because she's using a sledgehammer to push in a pin. Checking as you go via checking each key press is more lightweight and will work just as well. Who knows what sort of browser her code will run on ? It would not even surprise me for some mobile browsers to have some basic JS support but not regex.


Christian Graus - Microsoft MVP - C++

"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

GeneralRe: regular expession string for whole value or fractional value Pin
N a v a n e e t h5-Nov-07 22:44
N a v a n e e t h5-Nov-07 22:44 
GeneralRe: regular expession string for whole value or fractional value Pin
Sonia Gupta5-Nov-07 22:39
Sonia Gupta5-Nov-07 22:39 
GeneralRe: regular expession string for whole value or fractional value Pin
Christian Graus5-Nov-07 22:45
protectorChristian Graus5-Nov-07 22:45 
GeneralRe: regular expession string for whole value or fractional value Pin
Piyush Vardhan Singh5-Nov-07 22:47
Piyush Vardhan Singh5-Nov-07 22:47 
GeneralRe: regular expession string for whole value or fractional value Pin
Sonia Gupta5-Nov-07 22:51
Sonia Gupta5-Nov-07 22:51 
GeneralRe: regular expession string for whole value or fractional value Pin
N a v a n e e t h5-Nov-07 22:52
N a v a n e e t h5-Nov-07 22:52 
GeneralRe: regular expession string for whole value or fractional value Pin
Sonia Gupta5-Nov-07 22:58
Sonia Gupta5-Nov-07 22:58 
GeneralRe: regular expession string for whole value or fractional value Pin
Piyush Vardhan Singh5-Nov-07 23:04
Piyush Vardhan Singh5-Nov-07 23:04 
GeneralRe: regular expession string for whole value or fractional value Pin
Sonia Gupta5-Nov-07 23:05
Sonia Gupta5-Nov-07 23:05 
GeneralRe: regular expession string for whole value or fractional value Pin
Christian Graus5-Nov-07 23:09
protectorChristian Graus5-Nov-07 23:09 
GeneralRe: regular expession string for whole value or fractional value Pin
N a v a n e e t h5-Nov-07 22:51
N a v a n e e t h5-Nov-07 22:51 
AnswerRe: regular expession string for whole value or fractional value Pin
Sandeep Akhare5-Nov-07 23:05
Sandeep Akhare5-Nov-07 23:05 
GeneralRe: regular expession string for whole value or fractional value Pin
Christian Graus5-Nov-07 23:06
protectorChristian Graus5-Nov-07 23:06 
GeneralRe: regular expession string for whole value or fractional value Pin
Sonia Gupta5-Nov-07 23:11
Sonia Gupta5-Nov-07 23:11 
GeneralRe: regular expession string for whole value or fractional value Pin
Christian Graus5-Nov-07 23:13
protectorChristian Graus5-Nov-07 23:13 
JokeRe: regular expession string for whole value or fractional value Pin
Sandeep Akhare5-Nov-07 23:12
Sandeep Akhare5-Nov-07 23:12 
GeneralRe: regular expession string for whole value or fractional value Pin
Sonia Gupta5-Nov-07 23:08
Sonia Gupta5-Nov-07 23:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.