This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 11098 - Possible errors in integer and float regular expressions
Summary: Possible errors in integer and float regular expressions
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: WebIDL (show other bugs)
Version: unspecified
Hardware: All All
: P2 minor
Target Milestone: ---
Assignee: Cameron McCormack
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-19 21:04 UTC by Kevin Lindsey
Modified: 2010-10-28 04:52 UTC (History)
2 users (show)

See Also:


Attachments

Description Kevin Lindsey 2010-10-19 21:04:01 UTC
The regular expressions for "integer"[1] and "float"[2], as currently defined in the dev spec[3], do not allow negated base 10 numbers, nor negated scientific notation numbers with integer coefficients. I assume those cases should be allowed as well?

Thanks,
Kevin

[1] integer = -?0([0-7]*|[Xx][0-9A-Fa-f]+)|[1-9][0-9]*
[2] float = -?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+
[3] http://dev.w3.org/2006/webapi/WebIDL/#idl-grammar
Comment 1 Cameron McCormack 2010-10-28 04:52:50 UTC
Well spotted, thanks Kevin!