Re: validate that string input is a negative number

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



mpetrotta@xxxxxxxxx <mpetrotta@xxxxxxxxx> wrote:

<snip>

Or just a nice simple
int val;
return Int32.TryParse(s, out val) && val < 0

Exactly. This thread is a good example of why it's wise to avoid using
regular expressions where they're not truly advantageous :)

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.



Relevant Pages

  • Re: Another RNL question
    ... avoid it. ... sysplex or GRS or ... ... For IBM-MAIN subscribe / signoff / archive access instructions, ...
    (bit.listserv.ibm-main)
  • Re: Atkins news link
    ... I will try the cholesterol-reducing kind, ... >And Butter? ... I also have been trying to avoid it for years, ...
    (alt.support.diabetes)
  • Re: A good compiler
    ... We had a recent mega-thread about how to avoid a gcc warning. ... people avoid your compiler, and you have the right not to be happy ...
    (comp.lang.c)
  • Re: Upload huge file size: "The page cannot be displayed" browser error
    ... > Cmon Richard, you're trying to justify this guy being a prick. ... FAQ prior to posting questions to that group; ... So they can avoid the need to embarrass themselves again. ...
    (comp.lang.java.programmer)
  • Re: I am etc weekly, so I credit you.
    ... that might avoid him being cut. ... This stress is normal, but suddenly talk ... about him being a gun-nut came up. ...
    (sci.crypt)