Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #10174
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.42!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail |
|---|---|
| Content-Type | text/plain; charset="ISO-8859-1" |
| Message-ID | <6913494.xuaST5U3oO@PointedEars.de> (permalink) |
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Reply-To | Thomas 'PointedEars' Lahn <cljs@PointedEars.de> |
| Organization | PointedEars Software (PES) |
| Date | Thu, 12 Jan 2012 16:42:38 +0100 |
| User-Agent | KNode/4.4.11 |
| Content-Transfer-Encoding | 7Bit |
| Subject | Re: JavaScript Regex |
| Newsgroups | comp.lang.javascript |
| References | <8kosg7tha6n6epo47krtaulm9a269kvclo@4ax.com> <4f0ef6b7$0$30370$a8266bb1@newsreader.readnews.com> |
| Followup-To | comp.lang.javascript |
| MIME-Version | 1.0 |
| Lines | 27 |
| NNTP-Posting-Date | 12 Jan 2012 16:42:41 CET |
| NNTP-Posting-Host | 41c5e05a.newsspool4.arcor-online.net |
| X-Trace | DXC=W^H^eVIgY8G74okIm;?DS@4IUK<Cl32<A4Fo<]lROoRA8kF<OcfhCOK:;[^=Pn_eYADZm8W4\YJNLUFDj8T]K0?CDmniOZG;K0K9NjMHH^ORDC |
| X-Complaints-To | usenet-abuse@arcor.de |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.javascript:10174 |
Followups directed to: comp.lang.javascript
Show key headers only | View raw
Denis McMahon wrote:
> On Wed, 11 Jan 2012 20:51:26 -0800, Gene Wirchenko wrote:
>> I wish to parse a string to see if it is a valid fixed-decimal
>> value.
>
> /^[+-]?\d{1,}(\.\d*)?$/
>
> http://www.sined.co.uk/tmp/regex.htm
Wrong, see the ECMAScript Language Specification and, e. g., the JSON
website. And what is *fixed* about this?
!isNaN(+s)
where `s' is a String value, suffices for strings representing floating-
point values. If "fixed" is supposed to mean "a fixed number of decimals",
a more elaborate expression needs to be used, but not this one (what about
leading "." and scientific notation?). We have been over this.
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
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