Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #10418
| Newsgroups | comp.lang.javascript |
|---|---|
| Subject | Re: JavaScript Regex |
| From | "Evertjan." <exjxw.hannivoort@interxnl.net> |
| References | <8kosg7tha6n6epo47krtaulm9a269kvclo@4ax.com> <4f0ef6b7$0$30370$a8266bb1@newsreader.readnews.com> <Xns9FD8AC68C9038eejj99@194.109.133.133> <fXOYcxKZYHGPFwEk@invalid.uk.co.demon.merlyn.invalid> |
| Message-ID | <Xns9FE0691ABB4B5eejj99@194.109.133.133> (permalink) |
| Date | 2012-01-20 09:19 +0000 |
Dr J R Stockton wrote on 19 jan 2012 in comp.lang.javascript: >>var result = !isNaN(t) && !/[e\s]/i.test(t) >> >>[allows .123 ] > > It also allows "Infinity" with optional sign. This better? Remember we are talking aboutr strings: t = '-Infinity' not t = -Infinity <script type='text/javascript'> var t = '-Infinity'; //var t = 'NaN'; //var t = '.259'; var result = !isNaN(t) && !/[a-z\s]/i.test(t); alert(t+' is a fixed point number?\n'+result); </script> > Set t = "NaN", and one can see that "NaN" is wrong; it should be spelt > "Nan", because ECMAscript NaN is undoubtedly a Number but not a number. A fixed point Number? -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
JavaScript Regex Gene Wirchenko <genew@ocis.net> - 2012-01-11 20:51 -0800
Re: JavaScript Regex Ross McKay <au.org.zeta.at.rosko@invalid.invalid> - 2012-01-12 17:07 +1100
Re: JavaScript Regex Gene Wirchenko <genew@ocis.net> - 2012-01-12 12:13 -0800
Re: JavaScript Regex "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-01-12 20:48 +0000
Re: JavaScript Regex Dr J R Stockton <reply1202@merlyn.demon.co.uk> - 2012-01-14 20:41 +0000
Re: JavaScript Regex "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-01-15 20:08 +0000
Re: JavaScript Regex Dr J R Stockton <reply1203@merlyn.demon.co.uk> - 2012-01-16 21:55 +0000
Re: JavaScript Regex Denis McMahon <denismfmcmahon@gmail.com> - 2012-01-12 15:05 +0000
Re: JavaScript Regex Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-01-12 16:42 +0100
Re: JavaScript Regex "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-01-12 16:09 +0000
Re: JavaScript Regex "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-01-12 15:56 +0000
Re: JavaScript Regex Dr J R Stockton <reply1202@merlyn.demon.co.uk> - 2012-01-14 20:44 +0000
Re: JavaScript Regex Dr J R Stockton <reply1203@merlyn.demon.co.uk> - 2012-01-19 19:59 +0000
Re: JavaScript Regex "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-01-20 09:19 +0000
Re: JavaScript Regex Dr J R Stockton <reply1203@merlyn.demon.co.uk> - 2012-01-21 20:27 +0000
Re: JavaScript Regex Dr J R Stockton <reply1202@merlyn.demon.co.uk> - 2012-01-14 21:23 +0000
Re: JavaScript Regex Gene Wirchenko <genew@ocis.net> - 2012-01-15 21:10 -0800
Re: JavaScript Regex Dr J R Stockton <reply1203@merlyn.demon.co.uk> - 2012-01-17 20:01 +0000
Re: JavaScript Regex Scott Sauyet <scott.sauyet@gmail.com> - 2012-01-18 05:42 -0800
Re: JavaScript Regex Dr J R Stockton <reply1203@merlyn.demon.co.uk> - 2012-01-19 20:11 +0000
csiph-web