W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2012

[Bug 19778] Wrong regex for integer

From: <bugzilla@jessica.w3.org>
Date: Fri, 07 Dec 2012 04:51:09 +0000
To: public-script-coord@w3.org
Message-ID: <bug-19778-3890-GPozdYkMUE@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=19778

Cameron McCormack <cam@mcc.id.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Cameron McCormack <cam@mcc.id.au> ---
But there is also the statement:

  When tokenizing, the longest possible match MUST be used.

just below those that in the spec.  So I think it should be fine.  The order of
the alternation shouldn't matter if you are just using the regular expressions
for testing.  But if you are doing something like:

  if ($input =~ s/^float_regex//) {
  } elsif ($input =~ s/^integer_regex//) {
  } elsif ($input =~ s/^identifier_regex//) {
  } ...

then you could run in to trouble.  I've switched it around in case people are
directly using the regexes like this.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Friday, 7 December 2012 04:51:13 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:08 UTC